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
130
votes
6 answers
What is the proper way to use `pkg-config` from `cmake`?
Looking around on the net I have seen a lot of code like this:
include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
target_include_directories(app SYSTEM PUBLIC ${SDL2_INCLUDE_DIRS})
target_link_libraries(app ${SDL2_LIBRARIES})
However…

Grumbel
- 6,585
- 6
- 39
- 50
86
votes
10 answers
How to install pkg config in windows?
I am trying to do it, but all I can get is some source code that I don't know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/.

devoured elysium
- 101,373
- 131
- 340
- 557
78
votes
13 answers
Package opencv was not found in the pkg-config search path
I have installed OpenCV using the instructions in https://help.ubuntu.com/community/OpenCV
$ sudo su
$ sudo apt-get install build-essential
$ sudo apt-get install libavformat-dev
$ sudo apt-get install ffmpeg
$ sudo apt-get install libcv2.3…

aliep
- 1,702
- 2
- 21
- 33
57
votes
5 answers
pygobject-2.28.6 won't configure: No package 'gobject-introspection-1.0' found, how do I resolve?
I'm trying to get pygobject-2.28.6 to compile in cygwin (version in repository is 2.28.4 which has some issues). Here is the tail of ./configure:
checking for GLIB - version >= 2.24.0... yes (version 2.34.3)
checking for ffi... checking for FFI...…

Stupac
- 631
- 1
- 6
- 6
36
votes
4 answers
No package 'lua' found but i have it installed
I'm trying to install Lsyncd on Ubuntu 10.4 LTS but i get some error :
> checking for LUA... no checking for
> LUA... no checking for LUA...
> configure: error: Package requirements
> (lua >= 5.1.3) were not met:
>
> No package 'lua' found
>
>…

bru
- 383
- 1
- 3
- 8
33
votes
2 answers
PKG_CHECK_MODULES considered harmful?
Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer) but there is no clear, comprehensive explanation of their reasons as far as I've looked for. So, I ask:
Why would PKG_CHECK_MODULES be harmful?
What are…

brandizzi
- 26,083
- 8
- 103
- 158
29
votes
4 answers
Linux glib needs pkg-config and pkg-config needs glib?
I try to install udev. And udev gives me an error during the ./configure
--exists: command not found configure: error:
pkg-config and "glib-2.0 >= 2.16" not found, please set GLIB_CFLAGS and GLIB_LIBS
to the correct values or pass…

Peter
- 1,629
- 2
- 25
- 45
25
votes
2 answers
what is the significance of pkg-config in gcc?
While building a dbus-example, I found that we need to add a pkg-config in gcc. For example:
gcc `pkg-config --cflags --libs dbus-1` -o
What is the significance of pkg-config --cflags --libs dbus-1? what is pkg-config…

dexterous
- 6,422
- 12
- 51
- 99
24
votes
2 answers
pkg-config error during Rust cross-compilation
I am getting this error when I try to cross-compile some Rust; does anyone know what I should be doing?
This happens when I run cargo build --target aarch64, I get:
Compiling glib-sys v0.10.1
error: failed to run custom build command for `glib-sys…

Martin Ellison
- 1,043
- 1
- 13
- 25
24
votes
3 answers
set PKG_CONFIG_PATH in cmake
I have built opencv locally and installed it to a local directory (not the system default ). opencv.pc is present under a folder pkgconfig in this local folder. How can I find this opencv.pc from cmake, because I want to link and include opencv…

infoclogged
- 3,641
- 5
- 32
- 53
24
votes
7 answers
R devtools fails as "Package libxml-2.0 was not found in the pkg-config search path"
I am trying to install devtools in R version 3.2.1, however when I do the following error is thrown:
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing libxml-2.0.pc
to the PKG_CONFIG_PATH…

mattbawn
- 1,358
- 2
- 13
- 33
24
votes
4 answers
How do I fix 'brew install pkg-config'?
Warning: Could not link pkg-config. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link pkg-config`

dpott197
- 1,060
- 1
- 9
- 11
24
votes
2 answers
pkg-config and OSX 10.8, proper PKG_CONFIG_PATH? Missing .pc files?
I installed pkg-config with homebrew in OSX. I'm not sure what I should set my PKG_CONFIG_PATH to? Should it be a combination of /usr/include and /usr/local/include? Even if I use one or the other, I get an error about there not being any .pc…

Nick Desaulniers
- 2,046
- 3
- 25
- 47
21
votes
2 answers
How to use C++ Boost library with pkg-config?
I successfully compiled and installed the latest version of the Boost library onto my linux machine.
Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC.
Since I am too lazy for hand-coding my…

eold
- 5,972
- 11
- 56
- 75
19
votes
2 answers
How to specify dependency on external C library in .cabal?
I maintain a library with FFI bindings on Hackage. So my Haskell library depends on the corresponding C library and its header files. Now I specify the external dependency in the .cabal file like this:
PkgConfig-Depends:
libfoo >= 1.2
And it…

sastanin
- 40,473
- 13
- 103
- 130