opengazer/OpenGazer

Compile error

plartoo opened this issue · 1 comments

Hello,

I've been trying to compile OpenGazer for the last few days and now am stuck at the very close point. The error I'm getting is:

/home/mycomputer/Downloads/opengazer-0.1.2/LeastSquares.cpp:27: undefined reference to vnl_cholesky::solve(vnl_vector<double> const&) const' LeastSquares.o: In function~vnl_cholesky':
/usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference to vnl_vector<double>::~vnl_vector()' /usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference tovnl_matrix::~vnl_matrix()'
LeastSquares.o: In function LeastSquares::solve(double&, double&, double&)': /home/lacheephyo/Downloads/opengazer-0.1.2/LeastSquares.cpp:39: undefined reference tovnl_vector::~vnl_vector()'
LeastSquares.o: In function ~vnl_cholesky': /usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference tovnl_matrix::~vnl_matrix()'
/usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference to vnl_vector<double>::~vnl_vector()' /usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference tovnl_matrix::~vnl_matrix()'
/usr/local/include/vxl/core/vnl/algo/vnl_cholesky.h:45: undefined reference to `vnl_matrix::~vnl_matrix()'

My path (as far as I can tell) are set accordingly
$ echo $LD_LIBRARY_PATH
/usr/local/lib

I have installed "vxl-1.14.0" and am using Ubuntu 11.10

Please let me know what I could be doing wrong. Thank you

Hello there! Sorry for the late reply but I'm seeing this problem now and I've resolved my problem recently too. One of the changes that I had to make was in the order of gcc parameters in the Makefile file.

Originally the %.o rule is as below:

g++ -c $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(INCLUDES) $<

I had to change the order to make it look like:

g++ -c -o $@ $(INCLUDES) $<  `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(CPPFLAGS)

Also the opengazer rule was:

g++ $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs`  $(LINKER) $^

And I modified it to be:

g++ -o $@ $^ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs`  $(LINKER) $(CPPFLAGS)

Other than these, make sure you have specified the necessary include paths in the INCLUDES variable in Makefile.

Hope it's still not too late and it'll be of help.