Hi there,
On 3/7/06, Durai <[EMAIL PROTECTED]> wrote:
> I tried compiling the gtk libraries statically. But and linked my apps
> to the static library. But I have another problem now, the statically
> compiled gtk libraries are not able to load the pixbuf theme engines.
I believe this is due to the fact that (most) theme engines have,
in fact, shared libraries. You need to link libdl (and libc)
dynamically into your application for dynamic loading of libraries to
suceed. My suggestion would be to link GTK+ statically, and libdl/libc
dynamically, such as in the (crude) example below:
[EMAIL PROTECTED] ~]$ gcc -o foo `pkg-config --cflags gtk+-2.0` foo.c
-Wl,-Bstatic \
`pkg-config --libs gtk+-2.0 | sed s/\ -ldl//` -Wl,-Bdynamic -ldl
[EMAIL PROTECTED] ~]$ ldd foo
linux-gate.so.1 => (0xffffe000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7f7f000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e51000)
/lib/ld-linux.so.2 (0xb7fa9000)
[EMAIL PROTECTED] ~]$
The example above assumes gcc+binutils, but most modern linkers
accept this kind of construction.
Hope it helps,
Rodrigo
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list