How to solve this linker error?

I am trying to use a compiled library inside an Eclipse project. The compilation is fine, but during the binding I get an error message. Below is the detailed information generated in the eclipse console.

g ++ -L / usr / local / lib -o "readInput". /readInput.o -llibopencv_calib3d.so -llibopencv_contrib.so -llibopencv_core.so

/usr/bin/ld: cannot find -llibopencv_calib3d.so /usr/bin/ld: cannot find -llibopencv_contrib.so /usr/bin/ld: cannot find -llibopencv_core.so 

I don’t even know after providing the library paths why the linker gives an error so that it cannot find it.

+4
source share
1 answer

Assuming you have all the necessary libraries: for libSOMETHING.so specify -lSOMETHING instead of -llibSOMETHING.so . Omit the starting lib and the final .so .

+6
source

All Articles