Linux compiling library search

Source: Internet
Author: User
Linux compiler library search-Linux general technology-Linux programming and kernel information. The following is a detailed description. By default, the compiler only uses the library files under the/lib and/usr/lib directories.

You can add the path of the dynamic link library required for compilation in the file ld. so. conf. After adding the file, run the/sbin/ldconfig command. Make the configuration in the file take effect.

When installing a library, you can use the -- prefix/usr option to directly install the library to usr/lib.

When the program is compiled, use the script Configure to check whether the dependent library meets the conditions. usr/bin/pkgconfig is used to obtain the original data information of the library, this pkgcongfig program needs to be written from *. obtain information in the pc file.

When installing the library file, a folder of.../pkgconfig will be generated under.../lib, where information about the installation library file is stored.

The Compilation Program will use pkgconfig -- the library or package Configuration Utility to read the original data information of the installation library. How can the utility find the pkg-config folder? You can use the PKG_OCNFIG_PATH environment variable to specify the pkg-config folder.

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.