Re: gcc -lX11 and binary size



Flavio Ribeiro <flavio hackpalace com> writes:

> Hello,
> 
> I've recently started dealing with X applications and I've noticed that
> compiling with -lX11 gives me absolutely huge binaries. On Linux/i386
> and X11R6 4.0.1 a file containing only main(){} is compiled to a 900kB
> binary when the -lX11 switch is used. Stripping only reduces file size
> to 800kB.
> 
> As `gtk-config --libs --cflags` contains -lX11 and a compile without
> -lX11 gives very small (and perfect) binaries, I don't know how to
> proceed.
> 
> Could someone please enlighten me?

Most likely you are, for some reason missing the libX11.so symlink
which should be in /usr/X11R6/lib so the linker is falling back to the
static libX11.a library.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]