vcpkg fails to build glog with cmake 3.8 msvc 2017

Created on 23 Jul 2017  路  8Comments  路  Source: microsoft/vcpkg

Most helpful comment

Wow that's a measure blunder by google. They even mentioned in their coding guide https://google.github.io/styleguide/cppguide.html that macros should be avoided whenever possible.

Maybe you can file an issue on both glog and ctemplate to ask them to fix it?

All 8 comments

are you able to build glog from source with msvc 2017?

@jasjuang Using source it works but fails with vcpkg

I checked the log, the compilation error doesn't seem to be vcpkg specific. I wonder if vcpkg alters any compilation flag when compiling things. I am still on msvc 2015 because I am still waiting for the next cuda to support msvc 2017.

@atkawa7 Could you confirm that this issue still reproduces on the latest master? (vcpkg install glog works for me)

@ras0219 @jasjuang I am still having the same problem
glog.zip

@jasjuang @ras0219-msft Finally found the problem. Try installing ctemplate first and then glog causes the error or vice versa. The error is caused by both projects using similar definitions and headers. See this line.

https://github.com/OlafvdSpek/ctemplate/blob/master/src/windows/config.h#L19

#define GOOGLE_NAMESPACE  ctemplate

and on this https://github.com/google/glog/blob/master/src/windows/config.h#L4

#define GOOGLE_NAMESPACE  google

Wow that's a measure blunder by google. They even mentioned in their coding guide https://google.github.io/styleguide/cppguide.html that macros should be avoided whenever possible.

Maybe you can file an issue on both glog and ctemplate to ask them to fix it?

I'm confused, isn't config.h a private header?

Was this page helpful?
0 / 5 - 0 ratings