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

build error with VS2015 #267

Closed
mxgbs opened this issue Nov 22, 2017 · 2 comments · Fixed by #281
Closed

build error with VS2015 #267

mxgbs opened this issue Nov 22, 2017 · 2 comments · Fixed by #281

Comments

@mxgbs
Copy link

mxgbs commented Nov 22, 2017

Use cmake to generate the .sln (I installed the gflags first and linked to the cmake)
and then build the glog with VS2015, x64, debug/release. Following errors occur. Can someone help me with this? Thank you.
Severity Code Description Project File Line Suppression State
Error C2039 'ERROR': is not a member of 'google' logging_unittest
Documents\glog\glog-master\src\logging_unittest.cc 276
Error C2065 'ERROR': undeclared identifier logging_unittest
Documents\glog\glog-master\src\logging_unittest.cc 276

@kokerf
Copy link

kokerf commented Nov 28, 2017

@mxgbs maybe you can set the option 'BUILD_TESTING' as disable in cmake.

@graugans
Copy link

graugans commented Dec 13, 2017

Google glog defines a severity level ERROR, which is also defined in windows.h . You can make glog not define INFO, WARNING, ERROR, and FATAL by defining GLOG_NO_ABBREVIATED_SEVERITIES before including glog/logging.h

Take a look at this article. When using the provided glog's cmake config module this should already set by magic cmake hocus pocus.

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

Successfully merging a pull request may close this issue.

4 participants