简体   繁体   中英

How to resolve this linker error?

I am trying to use a compiled library inside an Eclipse project. The compilation goes fine but during linking i get an error. Below is the verbose generated on 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 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 . Omit the initial lib and final .so .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM