Cross Compiling Raytrace benchmark using X11

Nathan Kidd nathan-svn at spicycrypto.ca
Thu Sep 3 17:14:44 PDT 2009


Alan Coopersmith wrote:
> 
> ef wrote:
>> While compiling I am linking to the following libs with Raytrace:
>>  -lX11 -lGL -lGLU -lXext -lXau
>>
>> It is important to note that I made these static libaries on my
>> machine, downloading the source code from the X11 Website.
> 
> When static linking, order is very very very important.   -lX11 needs to
> be moved after -lXext so that the dependencies from libXext are known about
> when the linker is reading in libX11 and deciding what part of the static
> library it needs to copy into your binary.

If you're using gcc (well, gnu ld) and just trying to get the thing 
compiled rather than set up a long term "proper" build system, you can 
avoid the static-library-order dance by using the recursive symbol 
resolution grouping arguments: -( -)  (aka --start-group --end-group)

-Nathan



More information about the xorg mailing list