This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld not linking supplied symbols


Hi,

I'm trying to link a program using this command line:
"g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wun
def -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion
-Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2
-Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common -I../qt-x11-free-3.3.7/include
-I/usr/X11R6/include -DQT_THREAD_SUPPORT  -D_REENTRANT
-L../qt-x11-free-3.3.7/lib -L/usr/X11R6/lib     conftest.cc  -lXcursor
-lXrandr -lXinerama -lfontconfig -lXrender -lXft -lfreetype -lqt-mt
-lpng -
lz -lm -ljpeg -ldl  -lSM -lICE -lXext -lX11 -lSM -lICE  -lpthread"

And I get the output:
../qt-x11-free-3.3.7/lib/libqt-mt.a(qdesktopwidget_x11.o)(.text+0x2f4):
In function `QDeskt
opWidgetPrivate::init()':
: undefined reference to `XineramaQueryExtension'
../qt-x11-free-3.3.7/lib/libqt-mt.a(qdesktopwidget_x11.o)(.text+0x514):
In function `QDeskt
opWidgetPrivate::init()':
: undefined reference to `XineramaQueryScreens'
../qt-x11-free-3.3.7/lib/libqt-mt.a(qdesktopwidget_x11.o)(.text+0x537):
In function `QDeskt
opWidgetPrivate::init()':
: undefined reference to `XineramaIsActive'
collect2: ld returned 1 exit status

I already added the "-lXinerama" to ld. If I run: "nm
/usr/X11R6/lib/libXinerama.a | grep Xinerama", I get:
Xinerama.o:
000006c0 T XineramaIsActive
00000640 T XineramaQueryExtension
000007c0 T XineramaQueryScreens
00000680 T XineramaQueryVersion

I have the same problem if I replace "-lXinerama" with the path to the
file "/usr/X11R6/lib/libXinerama.a", so it seems it's not a directory
problem. BTW, the rest of -lXft, -lXext, -lX11, have the lib files in
the same /usr/X11R6/lib.

What I am missing? Is anything appart from the symbol name which makes
'ld' not to find the symbols?

Thanks in advance,
Lluís


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]