I have installed GCC and GTK+. Its working fine, but i need to statically link GTK+ libraries with my application (its a small application) so that there exist only one '.exe'. Can anybody suggest a solution for this problem...?
A:
The correct answer would be two words: not supported
. Really, if you want to distribute your application, being it 2 or 100000 lines, just bind a copy of GTK+ with it.
ntd
2010-02-03 13:11:46
+4
A:
It is supported with a few minor issues (like having trouble finding configuration files), but you will have to compile GTK+ yourself! (the default binaries do not include static libraries)
See this mailing-list thread for more information on this issue.
FX
2010-03-10 15:46:43
No, it is not. Read the full thread you linked, expecially the Tor Lillqvist comments (mantainer of the windows port).
ntd
2010-03-13 21:55:57
Tor points to two issues: Gtk+ finding 2. its message catalogs, and 1. its configuration files. To avoid configuration files, you can hard-code your configuration in the program, with calls to gtk_rc_parse_string. For the message catalogs, you can ship with them if you accept to loose internationalization.So, while not a perfect solution, it can be hacked.
FX
2010-03-13 23:21:09
These are not little issues and the thread was pure theoretical discussion. Anyway with the current GTK+ codebase (and this includes the build system) it is **not** possible. Otherwise, please, point me out to a single application linked against a GTK+ static library.
ntd
2010-03-14 10:43:49
I have built some statically-linked, relocatable apps on my mac (against Gtk+-2.10, without i18n). It requires hacking, but it is not impossible.
FX
2010-03-14 14:02:20
In maths, proofs of inexistence are sometimes easier than proofs of existence. In real life, though...
FX
2010-03-14 14:03:16