pkg-config is computer software that provides a unified interface for querying installed libraries for the purpose of compiling software from its source code.
Questions tagged [pkg-config]
479 questions
19
votes
2 answers
How to auto generate pkgconfig files from cmake targets
I would like to generate pkgconfig files in cmake from the targets. I started by writing something like this:
function(auto_pkgconfig TARGET)
get_target_property(INCLUDE_DIRS ${TARGET} INTERFACE_INCLUDE_DIRECTORIES)
string(REPLACE…

Paul Fultz II
- 17,682
- 13
- 62
- 59
19
votes
3 answers
Error:Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
I am using Point cloud library 1.5.1. When I run CMake 3.4.0-rc2 to build my project, it has error:
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
How do I fix this error?

user30985
- 573
- 1
- 6
- 19
16
votes
2 answers
node-gyp 'pkg-config: command not found' on mac 10.5.8 during npm install
Trying to do an npm install on mac-osx of github project. Don't see pkg-config in packages.json why would node-gyp expect this? It seems like the node-gyp should have incldued pkg-config. I thought this is the way node works. Install a package and…

Mobile Man
- 291
- 2
- 5
- 13
16
votes
5 answers
How to use pkg-config to link a library statically
I'd like to link libpng found by pkg-config statically.
pkg-config --libs --static libpng
outputs
-L/usr/local/Cellar/libpng/1.6.15/lib -lpng16 -lz
I have both libpng16.a libpng16.dylib in that directory, and if I use these flags the library gets…

Kornel
- 97,764
- 37
- 219
- 309
15
votes
3 answers
What is the best way to install pkg-config on Mingw in 2014?
What is a good way at this moment (October 2014) to install pkg-config on Windows in a (no HTTPS) MinGW / MinGW-w64 environment? (See also this question from 2009.)
If there is a binary package that does not pull in GTK+, that would be great, but I…

Felix Rabe
- 4,206
- 4
- 25
- 34
15
votes
2 answers
Add temporarily path to pkg-config within CMake script?
For external libraries the user can specify a non-standard location by adding the path to the CMAKE_FLAGS or by adding -DMYLIB_ROOT. Within the CMake script I want to find the library's pkg-config pc file. Because the pc file is not in the standard…

usr1234567
- 21,601
- 16
- 108
- 128
13
votes
2 answers
Using the pkg-config macro PKG_CHECK_MODULES failing
I'm sure this is a fairly simple problem. I have a very simple configure.ac file which I am using to just learn how autoconf & pkg-config work together. The confgure.ac file looks like:
AC_PREREQ(2.61)
AC_INIT(autoconf_test, 1.0,…

ericg
- 8,413
- 9
- 43
- 77
13
votes
1 answer
UUID library for C?
I'm looking for a UUID library for programming in C, that has a reasonable probability of being installed (or at least installable by package manager) on most modern Linux desktops, and works with pkg-config.
The following two possibilities seem…

ptomato
- 56,175
- 13
- 112
- 165
13
votes
4 answers
pkg-config cannot find .pc files although they are in the path
I am seeing a strange issue with pkg-config on Mac OSX-Lion. When running the python setup for module that I downloaded I receive the following error:
aspen:python toddysm$ sudo ./setup.py install
Password:
`pkg-config --libs --cflags cld` returns…

toddysm
- 598
- 3
- 5
- 15
12
votes
10 answers
Compiling FFMPEG x265 not found using pkg-config
I'm trying to compile FFMPEG with x265 on Win10. I am using the latest full MinGW build from xhmikosr found at:
http://xhmikosr.1f0.de/tools/msys/
FFMEPG without x265 compiles without problems and compiling x265 standalone works without problems…

secondplace
- 518
- 3
- 8
- 20
11
votes
2 answers
pkg-config cannot find gtk+-3.0
I am trying to use libui-node to build a Node.js project.
$ yarn add libui-node
This gives an error:
node-gyp configure build Package gtk+-3.0 was not found in the
pkg-config search path.
Perhaps you should add the directory
containing…

sdgfsdh
- 33,689
- 26
- 132
- 245
11
votes
8 answers
How do I compile jzmq for ZeroMQ on OSX?
Trying to follow the directions from: http://github.com/zeromq/jzmq
I installed pkg-config using Homebrew and then I run the following commands:
./autogen.sh
./configure
The configure fails with:
checking how to hardcode library paths into…

Joshua
- 26,234
- 22
- 77
- 106
11
votes
5 answers
How to use pkg-config for setting include paths in Xcode?
For example, if I need Gtk+ include paths.
How to use pkg-config gtk+-2.0 --cflags in Xcode project settings?

shoumikhin
- 1,327
- 15
- 23
11
votes
1 answer
D-Bus linking issue
I have been trying to compile a program for dbus and as suggested I did in the code as mention to a similar question. I did execute it as shown:
gcc `pkg-config --cflags dbus-glib-1` \
`pkg-config --cflags dbus-1` \
`pkg-config --cflags…

vku
- 175
- 1
- 1
- 10
11
votes
3 answers
pkg-config can't find opencv
I installed opencv on a lubuntu 12.10 distro. Then when I try to compile a code which is using opencv it says it can't find it. So I try in a terminal :
pkg-config --cflags --libs opencv
It answers me that it can't find opencv. But the files are…

Clement Roblot
- 879
- 2
- 8
- 15