Hello, I tried to build helloworld from the ceres's example folder using eclipse-cdt on Ubuntu 14.04. Initially, I had loads of linker errors and to fix this I ended up adding lots of lib but still I couldn't build it successfully.
I have struggled solving this error and would appreciate any help on this. My ceres is 1.11.0.
ZN13MessageLoggerD2Ev[_ZN13MessageLoggerD5Ev]+0x12f): undefined reference to `google::log_sinks_global'
------
For the long detail, I started by building ceres-solver following
http://ceres-solver.org/building.html#linux. I have installed all the packages:
sudo apt-get install libgoogle-glog-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libeigen3-dev
except libsuitesparse-dev as I already haved SuiteSparse 4.5.3 installed on my ubuntu. I built ceres succesfully.
Then I wanted to try to build my own project using ceres. I have started by create a C++ project using Eclipse and I used helloworld.cc as a source file, in my project I refered to it as hello_world.cpp. The compile and link command are below:
g++ -I/home/sonia/source/ceres-
solver-1.11.0/include -I/usr/include/eigen3 -I/home/sonia/source/ceres-solver-1.11.0/internal/ceres/miniglog -I/home/sonia/source/ceres-solver-1.11.0/config -O3 -Wall -c -fmessage-length=0 -std=c++11 -fpermissive -pthread -DMAX_LOG_LEVEL -MMD -MP -MF"hello_world.d" -MT"hello_world.d" -o "hello_world.o" "../hello_world.cpp"
g++ -L/home/sonia/source/ceres-
bin/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/home/sonia/source/SuiteSparse/lib -pthread -DMAX_LOG_LEVEL -o "hello_world" ./hello_world.o -lceres -lglog -lgtest -lgomp -lldl -ltest_util -lcolamd -lspqr -lumfpack -lmetis -lcholmod -lsuitesparseconfig -llapack -lamd -lcamd -lbtf -lklu -lblas
The compiling process was successful but the linker returned error about
google::log_sinks_global which I have no idea about the link. So, I really appreciate your help on this.
Thank you very much.