Re: Need help to link static gtk



You might consider shuffleing your `-l's on the command line. 

when I have this type of problem I usualy

for i in `find /lib (or /usr/lib) -name "*.a"`; do nm $i | grep symbol;
done

to find the lib thats missing.

again the lib might be on the command line
already but "in the wrong order".

also: `-rdynamic' ???
I dont see anything in the man pages;
are you using `libtool' ?


Hope this helps ;-)
        -Tristan

Günther Rapp wrote:

Linking my application with shared lib's all is ok but
trying to set  -static option the following undefined references occur

/usr/lib/libgdk.a(gdkinput.o): In function `gdk_input_device_new':
gdkinput.o(.text+0x68e): undefined reference to `XOpenDevice'
/usr/lib/libgdk.a(gdkinput.o): In function
`gdk_input_common_select_events':
gdkinput.o(.text+0xbcf): undefined reference to `XSelectExtensionEvent'
/usr/lib/libgdk.a(gdkinput.o): In function `gdk_input_common_init':
gdkinput.o(.text+0xcc4): undefined reference to `XListInputDevices'
gdkinput.o(.text+0xd20): undefined reference to `XFreeDeviceList'
/usr/lib/libgdk.a(gdkinput.o): In function
`gdk_input_common_motion_events':
gdkinput.o(.text+0x151d): undefined reference to
`XGetDeviceMotionEvents'
gdkinput.o(.text+0x15e0): undefined reference to
`XFreeDeviceMotionEvents'
/usr/lib/libgdk.a(gdkinput.o): In function
`gdk_input_common_get_pointer':
gdkinput.o(.text+0x177e): undefined reference to `XQueryDeviceState'
gdkinput.o(.text+0x181a): undefined reference to `XFreeDeviceState'
/usr/lib/libgdk.a(gdkinput.o): In function `gdk_input_check_proximity':
gdkinput.o(.text+0x1a89): undefined reference to `XQueryDeviceState'
gdkinput.o(.text+0x1ac2): undefined reference to `XFreeDeviceState'
/usr/lib/libgdk.a(gdkinput.o): In function
`gdk_input_xfree_grab_pointer':
gdkinput.o(.text+0x1e36): undefined reference to `XGrabDevice'
gdkinput.o(.text+0x1e94): undefined reference to `XUngrabDevice'
/usr/lib/libgdk.a(gdkinput.o): In function
`gdk_input_xfree_ungrab_pointer':
gdkinput.o(.text+0x1f43): undefined reference to `XUngrabDevice'

The linking options are
GTK_LIBS = -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule
-lglib -ldl -lXext -lX11 -lm
What lib is missing?

The system is rh7.2

--
R=I+S  Rapp Informatik Systeme GmbH
       Rosenbühlstr. 24
       D-89182 Bernstadt
       Tel:  +49 (0)7348-7755
       Fax:  +49 (0)7348-6086
E-MAIL  mailto: guenther rapp-informatik de
WEB             www.rapp-informatik.de



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