Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some marco definitions are conflicting with other packages. #7

Open
GoogleCodeExporter opened this issue Mar 3, 2016 · 4 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Include logging.h after windows.h
2. Include logging.h atter UnitTest++.h

What is the expected output? What do you see instead?

I've just started using glog in my project. but there are some problems.
Some definition are conflicting with other header's definition.

For example, ERROR is defined in wingdi.h, CHECK is defined in UnitTest++.
I think the macro names are too general. 

What version of the product are you using? On what operating system?
Visual Studio C++ 2005, Win32, UnitTest++

Please provide any additional information below.


Original issue reported on code.google.com by picky...@gmail.com on 2 Apr 2009 at 12:34

@GoogleCodeExporter
Copy link
Author

Yeah, I was aware of this issue. Maybe adding 'G' or something as the prefix 
character 
would solve this (e.g., GLOG(GERROR) << "foobar"). Of course, we would want to 
make 
this feature optional. This fix may take a while. For ERROR, if you are not 
using GDI 
actually,  please define a C macro NOGDI for the meantime.

Thanks,

Original comment by shinichi...@gmail.com on 7 Apr 2009 at 6:41

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I use patch below to eliminate this error and on Windows you should include the 
GLOG
library BEFORE any other library.

In my case I use the GLOG library after STL, but before boost.

Hope this helps

Original comment by lynxl...@gmail.com on 13 Apr 2010 at 10:43

Attachments:

@GoogleCodeExporter
Copy link
Author

Yeah, I think this patch solves 80% of this issue. However, unfortunately, I 
think 
this patch won't work for some cases such as

int level = ERROR;  // ERROR will be replaced by 0
LOG_AT_LEVEL(level) << "foobar";

Original comment by shinichi...@gmail.com on 27 May 2010 at 1:40

@GoogleCodeExporter
Copy link
Author

Issue 33 has been merged into this issue.

Original comment by shinichi...@gmail.com on 28 May 2010 at 3:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant