LD search problem under Linux: Ld:cannot find-l "XX"

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.