PKG_CONFIG_PATH

Thomas Stover thomas at wsinnovations.com
Tue Mar 31 08:06:14 PDT 2009


I don't use QT, but I'll take a stab at the question. I'm assuming you 
are talking about a cross compile, since otherwise this would be no 
different from the normal qt build procedure. Using a library (in this 
case qt) with a cross compiler, and leveraging pkg-config to help, is 
very different from building a library from a cross compiler. Many 
libraries simply do not support cross compilation, they must be built 
natively and then copied to your cross tool chain environment. Assuming 
qt supports cross compilation, I suppose what you are asking is how to 
set the PKG_CONFIG_PATH to direct the qt build system (what ever that 
is) to use dependencies for your ARM9 target. Naturally the headers and 
libraries for these dependencies need to be present somewhere on your 
system. Sometimes (especially if these dependencies were built natively 
and copied over) the .pc files for the dependencies in question need to 
be edited to reflect the correct full paths. After all that, try 
something like 
PKG_CONFIG_PATH=/paths/to/the/pc/files:/for/the/arm9/versions/of/the:/libs/qt/needs 
command-to-build-qt. Of course somewhere in there you also need the rest 
of the cross compiling information (like what compiler to use), but that 
will all depend on how its done in what ever qt uses for a build system. 
Remember all pkg-config does is pull the the paths for headers and 
libraries, find out what compiler flags need to be used, and what 
libraries need to be linked  to in a clean and simple manor for a given 
list of "packages".

Med ATHIMNI wrote:
> Hello,
>
> We would like compile QT 4.5 library for ARM9 using PKG_CONFIG_PATH ?
> Could you send us an example of a .pc configuration file for QT and 
> how to call pkg-config to use it ?
>
> In advance, thank you very much,
> Anne Saadi
> Cartelec
>



More information about the pkg-config mailing list