Sample Header Ad - 728x90

Use pkg-config with Homebrew installed software

12 votes
2 answers
12872 views
I have installed some libraries with Homebrew but if I use pkg-config it does not find them because there are missing .pc files. For example, if you do: brew install opencv and, after it is installed: pkg-config --libs opencv I get this error: Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable No package 'opencv' found This error is caused because Homebrew does not create any opencv.pc. Is there a way to configure Homebrew to create the .pc files so that all packages installed with brew can be found by pkg-config?
Asked by nkint (571 rep)
Dec 5, 2013, 12:20 PM
Last activity: Jun 11, 2022, 12:20 PM