From: boltar2003 on
Hi

I'm trying to create a static Xwin executable to send to someone to run on
their netbook but when I try to do a static link of the modules of my
program I get the following error:

/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../../i486-slackware-linux/bin/ld: cannot find -lX11

However I have set up the library path using -L correctly (it links fine when
non static linking is done) and when I look in the directory I can see
libX11.la sitting there , though I'm not quite sure what the difference
between a .a archive and a .la file is.

Does anyone know if its possible to static link X11 programs?

Thanks for any help

B2003

From: Ben Bacarisse on
boltar2003(a)boltar.world writes:

> I'm trying to create a static Xwin executable to send to someone to run on
> their netbook but when I try to do a static link of the modules of my
> program I get the following error:
>
> /usr/lib/gcc/i486-slackware-linux/4.3.3/../../../../i486-slackware-linux/bin/ld: cannot find -lX11
>
> However I have set up the library path using -L correctly (it links fine when
> non static linking is done) and when I look in the directory I can see
> libX11.la sitting there , though I'm not quite sure what the difference
> between a .a archive and a .la file is.

You need the .a file. The .la file not a library at all but the file
used by libtool to track information about the library.

<snip>
--
Ben.