pkg-config不适用于Cygwin [英] pkg-config doesn't work on Cygwin
问题描述
我尝试使用cygwin编译程序( OpenFP )。该程序依赖于我已经编译和安装成功的包 FFTW3
。但是,当我为主程序启动 ./ configure
时,会出现错误:
没有找到包'fftw3'configure configure:6138:错误:未满足包需求
(fftw3):未找到包'fftw3'请考虑调整
PKG_CONFIG_PATH环境变量b $ ba非标准前缀。或者,您可以设置环境
变量FFTW3_CFLAGS和FFTW3_LIBS,以避免需要调用
pkg-config。有关更多详细信息,请参阅pkg-config手册页。
pkg-config --list-all
未找到
fftw3
库,但 / usr / local / lib / pckconfig
包含必需 .pc
文件。好的,从文件fftw3.pc我拷贝 LIBS
和 CFLAGS
参数到 FFTW3_CFLAGS
和
FFTW3_LIBS
环境变量作为上面的错误消息提示。但我仍然得到相同的错误。
发生了什么问题?
在MinGW中以相同的方式设置变量解决了问题(我没有在MinGW中安装pkg-config),但是编译项目失败,因为MinGW中缺少一些特定于linux的头)
<您应该将
/ usr / local / lib / pckconfig
添加到您的 PKG_CONFIG_PATH / code>: $ export PKG_CONFIG_PATH = $ PKG_CONFIG_PATH:/ usr / local / lib / pkgconfig
这会告诉 pkg-config
查看其他位置,除了其标准路径。
I try to compile a program (OpenFP) using cygwin. The program depends on a package FFTW3
which I've compiled and installed succesfully. However when I launch ./configure
for the main program I get an error:
No package 'fftw3' found configure:6138: error: Package requirements
("fftw3") were not met: No package 'fftw3' found Consider adjusting
the PKG_CONFIG_PATH environment variable if you installed software in
a non-standard prefix. Alternatively, you may set the environment
variables FFTW3_CFLAGS and FFTW3_LIBS to avoid the need to call
pkg-config. See the pkg-config man page for more details.
pkg-config --list-all
doesn't find fftw3
library but /usr/local/lib/pckconfig
contains required .pc
file. Ok, from that file fftw3.pc i copied LIBS
and CFLAGS
parameters into FFTW3_CFLAGS
and FFTW3_LIBS
evironment variables as the error message above prompted. However I'm still getting the same error.
What's wrong?
P.S. Setting variables the same way in MinGW solved the problem (I have not installed pkg-config in MinGW), but compilation of the project failed due to the lack of some linux-specific headers in MinGW)
解决方案 You should add /usr/local/lib/pckconfig
to your PKG_CONFIG_PATH
:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
This tells pkg-config
to look in an additional location, besides its standard path.
这篇关于pkg-config不适用于Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!