techoe / ceres-solver

Automatically exported from code.google.com/p/ceres-solver
Other
0 stars 0 forks source link

gflags include missing from some files #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following files could not be compiled. Looks like they need to #include 
"gflags/gflags.h"

internal/ceres/visibility_based_preconditioner_test.cc
examples/data_fitting.cc

Original issue reported on code.google.com by jack.valmadre on 26 Jul 2012 at 3:22

GoogleCodeExporter commented 9 years ago
Jack could you describe your environment please? os/compiler?

Original comment by sandwich...@gmail.com on 26 Jul 2012 at 3:23

GoogleCodeExporter commented 9 years ago

Original comment by sandwich...@gmail.com on 26 Jul 2012 at 3:23

GoogleCodeExporter commented 9 years ago
Sure, sorry! The problem is occurring on Ubuntu 10.04.4 (64-bit) with gcc 
4.4.3. This morning I tried building it on a different machine (OS X 10.7.4) 
and it worked fine (with both gcc 4.2.1 and clang 3.1). I was using gflags 2.0 
in both cases.

Original comment by jack.valmadre on 27 Jul 2012 at 2:26

GoogleCodeExporter commented 9 years ago
And here are the errors:

internal/ceres/visibility_based_preconditioner_test.cc:51
error: expected constructor, destructor, or type conversion before ‘(’ token
DECLARE_string(test_srcdir);

examples/data_fitting.cc:138
error: ‘ParseCommandLineFlags’ is not a member of ‘google’
  google::ParseCommandLineFlags(&argc, &argv, true);

Original comment by jack.valmadre on 27 Jul 2012 at 2:32

GoogleCodeExporter commented 9 years ago
Thanks Jack. I will look at this early next week.

Original comment by sandwich...@gmail.com on 27 Jul 2012 at 2:45

GoogleCodeExporter commented 9 years ago
Same error on windows 7, Visual Studio 2010, compiling in x64.

Original comment by luis.jor...@gmail.com on 27 Jul 2012 at 4:57

GoogleCodeExporter commented 9 years ago
Hi guys, thanks for the reports. It's odd that I didn't get the same errors. 
I'll try to reproduce again tonight (and I finally got a Win32 box in addition 
to my Win64 box).

Original comment by mie...@gmail.com on 27 Jul 2012 at 8:12

GoogleCodeExporter commented 9 years ago
I have a similar error building data_fitting on u11.04 x64, g++ 4.5.2, 

Scanning dependencies of target data_fitting
[ 96%] Building CXX object 
examples/CMakeFiles/data_fitting.dir/data_fitting.cc.o
/home/dl/ceres-solver/examples/data_fitting.cc: In function ‘int main(int, 
char**)’:
/home/dl/ceres-solver/examples/data_fitting.cc:138:3: error: 
‘ParseCommandLineFlags’ is not a member of ‘google’
make[2]: *** [examples/CMakeFiles/data_fitting.dir/data_fitting.cc.o] Error 1
make[1]: *** [examples/CMakeFiles/data_fitting.dir/all] Error 2
make: *** [all] Error 2

Original comment by adonphil...@gmail.com on 9 Aug 2012 at 7:04

GoogleCodeExporter commented 9 years ago
I was able to successfully build the same version (1.2.3) on i686 without issue.

Original comment by adonphil...@gmail.com on 9 Aug 2012 at 9:12

GoogleCodeExporter commented 9 years ago
I think this is fixed in the trunk now. Closing, will re-open if this issue 
persists.

Original comment by sameerag...@google.com on 27 Aug 2012 at 9:08