Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #1

Open
plartoo opened this issue Apr 12, 2012 · 1 comment
Open

Compile error #1

plartoo opened this issue Apr 12, 2012 · 1 comment

Comments

@plartoo
Copy link

plartoo commented Apr 12, 2012

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

@tiendan
Copy link

tiendan commented Oct 11, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants