[英]How to resolve this linker error?
I am trying to use a compiled library inside an Eclipse project. 我正在尝试在Eclipse项目中使用已编译的库。 The compilation goes fine but during linking i get an error. 编译很好,但是在链接期间出现错误。 Below is the verbose generated on eclipse console. 以下是在Eclipse控制台上生成的详细信息。
g++ -L/usr/local/lib -o "readInput" ./readInput.o -llibopencv_calib3d.so -llibopencv_contrib.so -llibopencv_core.so 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 dont know even after providing the library paths why is the linker giving error that it could not find it. 我什至不知道提供库路径后,链接器为什么会给出无法找到它的错误。
Assuming you have all required libraries: for libSOMETHING.so
, specify -lSOMETHING
instead of -llibSOMETHING.so
. 假设您具有所有必需的库:对于libSOMETHING.so
,请指定-lSOMETHING
而不是-llibSOMETHING.so
。 Omit the initial lib
and final .so
. 省略初始lib
和最终.so
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.