pkg-config doesn't work on Cygwin

Andrey Sboev picture Andrey Sboev · Nov 29, 2011 · Viewed 7.1k times · Source

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)

Answer

Some programmer dude picture Some programmer dude · Nov 29, 2011

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.