static linking
- From: riboaz xs4all nl
- To: gtk-list gnome org
- Subject: static linking
- Date: Wed, 4 May 2005 15:15:01 +0200 (CEST)
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?
cheers,
richard boaz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]