Working with libraries: Difference between revisions

 
Line 16: Line 16:


==Building with libraries==
==Building with libraries==
* If the library supports [http://pkg-config.freedesktop.org pkg-config], and you're willing to depend on that tool being installed, proper compilation flags can be lifted from it:
* If the library supports [[pkg-config]], and you're willing to depend on that tool being installed, proper compilation flags can be lifted from it:
** <tt>pkg-config --cflags ''pkgname''</tt> will pull the preprocessor and compilation flags
** <tt>pkg-config --cflags ''pkgname''</tt> will pull the preprocessor and compilation flags
** <tt>pkg-config --libs ''pkgname''</tt> will pull the linking flags
** <tt>pkg-config --libs ''pkgname''</tt> will pull the linking flags