pkg-config用法
http://www.sitearchitect.cn/archives/262
概述
返回已安装库文件的元信息。
环境变量:PKG_CONFIG_PATH。pkg-config将在该变量下查找所有的.pc文件。此外,它还会查找/usr/lib/pkgconfig/下的.pc文件。
pkg-config works on multiple platforms: Linux and other UNIX-like operating systems, Mac OS X and Windows. It does not require anything but a reasonably well working C compiler and a C library, but can use an installed glib if that is present. (A copy of glib 1.2.8 is shipped together with pkg-config and this is sufficient for pkg-config to compile and work properly.)
库文件编译完成后,会在{installed_home/lib/}下生成产生一个名为pkgconfig的目录,内含该链接库的.pc文件。这时需要将该文件复制到/usr/lib/pkgconfig/目录中或在环境变量中指定该文件的路径。这样做的目的是为了使依赖此链接库的其它程序能够借助 pkg-config自动加载该库,避免编译期错误。
参数列表
–list 列出所有已安装的共享库
–cflags 列出指定共享库的预处理和编译flag。
–libs 列出指定共享库的链接flag。
分享到:
相关推荐
pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.c `pkg-...
用于C++ Rust windows环境开发的基础工具,pkg-config-lite-0.28-1_bin-win32
pkg-config 是通过库提供的一个 .pc 文件获得库的各种必要信息的,包括版本信息、编译和连接需要的参数等。这些信息可以通过 pkg-config 提供的参数单独提取出来直接供编译器和连接器使用。
pkg-config本身是一个linux下的命令,其功能是用于获得某一个库/模块的所有编译相关的信息。 # 在windows上面配置pkg-config 将下载的pkg-config_0.23-2_win64解压,解压的bin与MinGW-w64里的的bin目录合并。
pkg-config-0.28.tar.gz
pkg-config for windows x64
pkg-config for windows x86
分享pkg-config-0.29.1.tar.gz源码资源,解决国外站点下载很慢
pkg-config_0.23-3_win32.zip
pkg-config用来检索系统中安装库文件的信息。典型的是用作库的编译和连接。如在Makefile中
pkg-config is a script to make putting together all the build flags when compiling/linking a lot easier. Report bugs at http://bugzilla.freedesktop.org/
本人在网上搜集的pkg-config压缩包,可以正常使用,适合使用mingw和msys交叉编译时提示缺少pkg-config的情况。
pkg-config-rs 一个简单的库,打算与Cargo软件包一起用作构建依赖项,以便使用系统pkg-config工具(如果有)来确定库的位置。 您可以直接使用此板条箱来探查特定的库,也可以使用在中声明所有pkg-config依赖Cargo....
离线安装包,亲测可用
官方离线安装包,亲测可用
pkg-config-dev_0.23-3_win32 编程出错时可能确实的包错误如下 configure.ac:1: error: possibly undefined macro: dnl If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf ...
官方离线安装包,亲测可用
pkg-config.exe
pkg-config-0.26-1-win32.zip