The search path for the LD command-line tool (a tool for the link library) is specified by-l, and the library name is specified by-L.
For example: Ld-l[dir]-l[mylib]--verbose
The above I use the visual method to display the LD search path, the result is actually in mylib, that is, the library file name automatically added to the prefix lib, resulting in not finding my mylib, because my Lib name does not join the LIB prefix. So you have to change the name of the library, plus the LIB prefix. What is the design purpose of LD? Is the prefix added to reduce the probability of conflict??? APIs like many third-party libraries also have their own prefixes, such as OpenGL, which has a GL prefix, to reduce collisions.
Ld-l/home/a/dls/dls/trunk/dlf/pc/lib-lkp_wdapi1160_gcc_v3--verbose
Attempt to open/home/a/dls/dls/trunk/dlf/pc/lib/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/home/a/dls/dls/trunk/dlf/pc/lib/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/x86_64-linux-gnu/lib64/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/x86_64-linux-gnu/lib64/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/local/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/local/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/local/lib64/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/local/lib64/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/lib64/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/lib64/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/lib/x86_64-linux-gnu/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/lib64/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/lib64/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/local/lib/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/local/lib/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/lib/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/lib/libkp_wdapi1160_gcc_v3.a failed
Attempt to open/usr/lib/libkp_wdapi1160_gcc_v3.so failed
Attempt to open/usr/lib/libkp_wdapi1160_gcc_v3.a failed
Ld:cannot Find-lkp_wdapi1160_gcc_v3
Reference
Http://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary
LD search problem under Linux: Ld:cannot find-l "XX"