A problem with compiling open-source software -- the library cannot be found in PKG-config

Source: Internet
Author: User

Generally, the first step for compiling open-source software is to run./configure. Determine whether the commands or libraries required for compiling the software can be found in the system, and then run./make to compile the software.

However, running./configure sometimes reports an error, saying that the required library cannot be found, but the library may still not be found after LD_LIBRARY_PATH is set (for how to set it, refer to this blog ).

The reason the library cannot be found is that another one is called in./configure.Program: PKG-config. This program is responsible. find the library information in the file with the PC suffix, for example, the Library name is libfoo. so *, then PKG-config will be in libfoo. find the path of the database in the PC file.

But where can I find the. PC file in PKG-config? A path pkg_config_path is involved here, which is the same as setting other paths (see the blog above). After setting the path, you can find the library.

References:

The art of debugging with GDB, DDD, and eclipse. Norman matloff and Peter Jay Salzman.

Related Article

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.