Pkg-config

Pkg-config

pkg-config is a piece of computer software that provides a unified interface for querying installed libraries for the purpose of compiling software from its source code. pkg-config was originally designed for Linux but is now also available for the various BSDs, Microsoft Windows, Mac OS X, and Solaris.

It outputs various information about installed libraries. This information may include:
* Parameters for C or C++ compiler
* Parameters for linker
* Version of the package in question
* Presence of a package (with specified range of versions) in the system

How it Works

When a library is installed (say from an RPM, deb or other binary packaging system), a .pc file should be included and placed into a directory with other .pc files (the exact directory is dependent upon your system and outlined in the pkg-config man page). This file has several entries.

These entries typically contain the libraries that the other programs using the package needs to compile as well as the location of header files, version information and a description.

Here is an example .pc file for libpng: prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${exec_prefix}/include Name: libpng12 Description: Loads and saves PNG files Version: 1.2.8 Libs: -L${libdir} -lpng12 -lz Cflags: -I${includedir}/libpng12

This file tells us that libraries can be found in /usr/local/lib and headers in /usr/local/include, that the library name is libpng12 and the version is 1.2.8. It also provides the linker flags that are needed to compile code depending upon libpng.

If one installs from source, often there will be no .pc file generated, and one may need to be manually written to reflect the install.

External links

* [http://pkg-config.freedesktop.org/ pkg-config home at freedesktop.org]
* [http://www.die.net/doc/linux/man/man1/pkg-config.1.html pkg-config manual page]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • pkg-config — Aktuelle Version 0.25 (Mai 2010) Programmier­sprache C Kategorie Programmierwerkzeug Lizenz GPL …   Deutsch Wikipedia

  • Pkg-config — (von engl. package, „Paket“ und config, „Konfiguration“) ist ein Computerprogramm, das eine einheitliche Schnittstelle zur Abfrage von Metadaten über beliebige Software bereitstellt. pkg config wird in erster Linie für die Versionsverwaltung… …   Deutsch Wikipedia

  • Pkg-config — Développeur Tollef Fog Heen / freedesktop.org Écrit en …   Wikipédia en Français

  • Pkg-config — Saltar a navegación, búsqueda pkg config es un software de ordenador que provée una interfaz unificada para llamar librerías instaladas cuando se está compilando un programa a partir del código fuente. pkg config fue diseñado originalmente para… …   Wikipedia Español

  • pkg-config — Тип Programming tool Автор James Henstridge; переписана Хэвоком Пеннингтоном Разработчик Tollef Fog Heen / freedesktop.org Операционная система Unix like Первый выпуск 2006 12 11; 2192 days a …   Википедия

  • Autoconf — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für …   Deutsch Wikipedia

  • Autoheader — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für …   Deutsch Wikipedia

  • Automake — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für …   Deutsch Wikipedia

  • Autotools — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für …   Deutsch Wikipedia

  • Configure — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”