Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: mbu on May 19, 2008, 05:51:47 pm
-
Hi,
I've got a problem with the linking options in C::B. I try to use the VXL libraries within a project. In the build options I entered two informations:
a) Search directories/Linker: Here I put the path to the VXL libraries.
b) Linker settings: I added a library (e.g. vnl.lib)
When building the project the linker tells me: "cannot find -lvnl.lib". Where is the problem. Shouldn't he search for the library in the folder I entered unter Search directories?
Thanks in advance, mbu.
-
Try removing the ".lib" of "-lvnl.lib"
-
If I remove the .lib the linker doesn't complain about not finding the library. But now he tells me
Compiling: source\main.cpp
Linking console executable: bin\Debug\cvl.exe
obj\Debug\source\main.o: In function `main':
D:/dev/cvl/source/main.cpp:6: undefined reference to `vnl_matrix<double>::vnl_matrix(unsigned int, unsigned int, double const&)'
D:/dev/cvl/source/main.cpp:14: undefined reference to `vnl_matrix<double>::~vnl_matrix()'
D:/dev/cvl/source/main.cpp:14: undefined reference to `vnl_matrix<double>::~vnl_matrix()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings
That's strange because when I try to compile the code with VS9 it works. Any idea?
-
This is not a general programming forum. The forum is for specific questions about CodeBlocks IDE.
However:
http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__matrix.html
My guess is that the calls to those template routines must be incorrect and not supported by the library. From a cursory look at the docs, it seems to me that the third parameter (as you've used it) may have to be a reference to a matrix, not a reference to a double.