DevO2012 / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Google glog fails to compile against gflags #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build and install gflags (using the bugfix/#77 branch).
2. Download glog code and run ./configure --with-gflags=path/to/gflags
3. Notice compiler error:

/home/kevin/vtdeps/include/gflags/gflags_declare.h:116:20: error: 
`GFLAGS_NAMESPACE' does not name a type
   DECLARE_VARIABLE(GFLAGS_NAMESPACE::int32, I, name)
                    ^

I'm guessing that GFLAGS_NAMESPACE should be @GFLAGS_NAMESPACE@ and that string 
should be replaced by the contents of the cmake variable of the same name.  
This needs to be done for the .cc files as well as the .h files.

Alternatively, add a #define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@ preprocessor 
variable somewhere along the way.

Original issue reported on code.google.com by godbyk@gmail.com on 26 Mar 2014 at 7:23

GoogleCodeExporter commented 9 years ago
Thanks for reporing. You are right that it should have been replaced by the 
value of the CMake variable in gflags_declare.h . In the .cc files, the #define 
in the internal config.h is used, however. The idea is simply not to add to 
many gflags library related #defines to the public headers.

Original comment by andreas....@gmail.com on 26 Mar 2014 at 7:29

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 38213112a57f.

Original comment by andreas....@gmail.com on 26 Mar 2014 at 7:37

GoogleCodeExporter commented 9 years ago
This issue should be fixed. Before the next (bugfix) release, I will make sure 
to add a test which uses gflags_declare.h only which would have avoided these 
fixes.

Original comment by andreas....@gmail.com on 26 Mar 2014 at 7:38

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 38213112a57f.

Original comment by andreas....@gmail.com on 27 Mar 2014 at 1:31

GoogleCodeExporter commented 9 years ago
This issue was updated by revision dc8543a47385.

Added a test which uses gflags_declare.h as any other project would use it to 
avoid such avoidable build configuration mistakes.

Original comment by andreas....@gmail.com on 30 Mar 2014 at 2:16