Eigen libarary linking error
-
I am developing visualizer application based on this libBSDF. In that i am using .pro file instead of cmake. In that i am using eigen library for computation. I included the library's as follows
I am getting the following linking error
Please do a needful as soon as possible.
-
@eswaramrth03 said in Eigen libarary linking error:
Please do a needful as soon as possible.
This is user forum, be patient.
Please post text, not screen-shots.Back to your issue: please take a closer look at how you're adding libBSDF. Do you think you're doing it correctly? When using -l parameter you have to remove lib prefix, so it should be -lbsdf.
Regarding Eigen: where do you set LIBS to tell the linker to link it? -
@eswaramrth03
If that path is correct for its header files then yes. In any case, header file issues are dealt with at compile time. You show linker errors.@jsulm already said (both) your
LIBS +=
lines are wrong forlibbsdf
, so what did you do about those? -
@eswaramrth03 said in Eigen libarary linking error:
Eigen is a C++ template library
All of it?
You get a linker error, so looks like a lib is missing. -
@eswaramrth03 said in Eigen libarary linking error:
so only i included as -llibsdf in .pro file
Which is wrong as already mentioned in this thread.
It has to be -lsdf (lib prefix and .so suffix needs to be removed from library file name when using -l). -
@eswaramrth03
Just so we understand what is going. For the debug case you seem to have:LIBS += -L$$PWD/deps/libbsdf/LibbsdfBin/debug/ -llibbsdf
Temporarily try changing that to
LIBS += $$PWD/deps/libbsdf/LibbsdfBin/debug/libbsdf.lib
(Adjust above for release instead of debug if compiling that way.)
I am hoping this is allowed and will clarify that for sure you are linking with that library file, and that it exists. Examine any error messages you might get.
Also confirm that everything --- your own code and whatever libraries you link with --- are all compiled with MSVC (not MinGW) and all with the same version of MSVC?
-
@eswaramrth03 Please post the whole build log as text
-
-