2025-03-14 21:59:59 -06:00
|
|
|
# pkg-config
|
|
|
|
|
|
|
|
|
|
> Provide the details of installed libraries for compiling applications.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://manned.org/pkg-config>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Get the list of libraries and their dependencies:
|
|
|
|
|
|
|
|
|
|
`pkg-config --libs {{library1 library2 ...}}`
|
|
|
|
|
|
|
|
|
|
- Get the list of libraries, their dependencies, and proper cflags for gcc:
|
|
|
|
|
|
|
|
|
|
`pkg-config --cflags --libs {{library1 library2 ...}}`
|
|
|
|
|
|
|
|
|
|
- Compile your code with libgtk-3, libwebkit2gtk-4.0 and all their dependencies:
|
|
|
|
|
|
|
|
|
|
`c++ example.cpp $(pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -o example`
|