Re: static linking

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

 



On Wed, 2005-05-04 at 15:15 +0200, riboaz@xxxxxxxxx wrote:
> hi,
> 
> this question was posed during the last week and i was very curious as to
> the answer, but nothing came across this particular mailing list, so i'm a
> gonna ask again:
> 
> how does one link a gtk+ application (v2.6.2) as a static executable?
> 
> the command
>     pkg-config --libs
> always returns
>     -Wl,--export-dynamic
> 
> presumably this dynamic link specifier disables static linking (adding
> -static in the makefile doesn't help).
> 
> when modifying my makefile by hand and providing the pkg-config libraries
> explicitly, (but *without* the -dynamic specifier and *with* the -static
> specifier), the linker complains that the gtk library cannot be found.
> 
> what i conclude is that the installation of gtk+ does not, by default,
> create and/or install static libraries.
> 
> is, thus, a requirement of gtk+ that all applications must run on a
> machine where gtk+ is installed, or is there another way to compile and
> install gtk+ so that static libraries are also included, allowing
> statically linked gtk+ apps?

static linking against gtk+ is not generally useful. You would have to
compile in all the required modules as well, which are normally dlopened
at runtime: theme engines, input methods, pixbuf loaders.

Matthias

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux