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.