Proper use of pkg-config in XCode

Brandon Allbery allbery at
Sat May 22 20:48:22 PDT 2010

On May 22, 2010, at 23:12 , kyle at wrote:
> But, I have been trying to figure out how to properly use pkg-config  
> in XCode's GCC 4.0 "Other C++ flags" field under Project Settings.
> `pkg-config\ --cflags\ --libs\ cairo\ librsvg-2.0`
> "`pkg-config --cflags --libs cairo librsvg-2.0`"

Right, it won't run shell commands and interpolate the result (which  
is what the backticks do, but only in shells, not in random programs).

> It should be possible to use the output from pkg-config somewhere in  
> XCode, right? Should I use this command in Terminal and then copy- 
> paste that output into the Other Flags field?


brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at
system administrator [openafs,heimdal,too many hats] allbery at
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the macports-users mailing list