2011-11-29 308 views
6

我尝试使用cygwin编译程序(OpenFP)。该程序取决于我编译并安装成功的包FFTW3。然而,当我启动./configure主程序我得到一个错误:pkg-config在Cygwin上无法运行

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没有找到fftw3库,但/usr/local/lib/pckconfig包含所需.pc文件。好的,从该文件fftw3.pc我复制LIBSCFLAGS参数到FFTW3_CFLAGSFFTW3_LIBS环境变量作为上面的错误消息提示。不过,我仍然遇到同样的错误。

怎么了?

P.S.在MinGW中以相同的方式设置变量解决了这个问题(我没有在MinGW中安装pkg-config),但是由于在MinGW中缺少一些linux特定的头文件,编译项目失败了)

回答

4

您应该添加/usr/local/lib/pckconfigPKG_CONFIG_PATH

$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig 

这告诉pkg-config中的其他位置看,除了它的标准路径。

+3

谢谢你的回答。我不得不提到,我试图这样做,但没有效果。然而,我解决了这个问题改变本地Windows路径的问题!即'export PKG_CONFIG_PATH = c:\\ cygwin \\ usr \\ local \\ lib \\ pkgconfig' – Andrey

+0

@Andrey它对我来说是空的“C:\ cygwin64 \ usr \ local \ lib \ NOTHINGisHERE”;但'cygcheck -c'显示pkg-config已安装! –