CONTENT
  • CHANGES
Szukaj
counter

#top pkg-config


pkg-config - Return metainformation about installed libraries

Powiązane:

SYNOPSIS
pkg-config [--modversion] [--help] [--print-errors] [--silence-errors] [--cflags] [--libs] [--libs-only-L] [--libs-only-l] [--cflags-only-I] [--variable=VARIABLENAME] [--define-variable=VARIABLENAME=VARI-ABLEVALUE] [--uninstalled] [--exists] [--atleast-version=VERSION] [--exact-version=VERSION] [--max-version=VERSION] [LIBRARIES...]

DESCRIPTION



The following options are used to compile and link programs:
OPTIONS
--cflags
This prints pre-processor and compile flags required to compile the packages on the command line, including flags for all their dependencies. Flags are "compressed" so that each identical flag appears only once. pkg-config exits with a nonzero code if it can't find metadata for one or more of the packages on the command line.

--libs
This option is identical to "--cflags", only it prints the link flags. As with "--cflags", duplicate flags are merged (maintaining proper ordering), and flags for dependencies are included in the output.

--libs-only-L
This prints the -L/-R part of "--libs". That is, it defines the library search path but doesn't specify which libraries to link with.

--libs-only-l
This prints the -l part of "--libs" for the libraries specified on the command line. Note that the union of "--libs-only-l" and "--libs-only-L" may be smaller than "--libs", due to flags such as -rdynamic.



EXAMPLES
pkg-config --cflags glib-2.0
Rezultat:
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

pkg-config --libs glib-2.0
Rezultat:
-L/lib -lglib-2.0

pkg-config --libs-only-L glib-2.0
Rezultat:
-L/lib

pkg-config --libs-only-l glib-2.0
Rezultat:
-lglib-2.0

gcc `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` code.c




Zmodyfikowany ostatnio: 2014/05/15 10:31:20 (9 lat temu), textsize: 2,39 kB, htmlsize: 3,03 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników