Cross Compiling Raytrace benchmark using X11

Alan Coopersmith Alan.Coopersmith at Sun.COM
Thu Sep 3 01:27:47 PDT 2009

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.

(Not having to worry about this is just one of the many reasons that
 shared libraries are much better than static linking.)

	-Alan Coopersmith-           alan.coopersmith at
	 Sun Microsystems, Inc. - X Window System Engineering

More information about the xorg mailing list