Mail Archives: cygwin/2002/11/09/05:59:21
Hello Robert
By default symbols in libstdc++.a are excluded when doing --export-all, to
protect against this type of error.
However, ld/pe-dll.c knows nothing about libstdc++-2.a. So those symbols do
get exported ... and cause the usual problems with multiple definitions.
Quick solution: Try --exclude-libs=libstdc++-2.a
Danny
Robert Collins wrote:
Hmm, a new ?bug? in binutils:
Linking a g++-2 compiled program, with a g++-2 compiled dll
(line breaks and blank lines added for clarity)
RobertC AT LIFELESSAMD ~/src/barch/build
make
/bin/bash ./libtool --mode=link g++-2 -g -O2 -o get-archive-name.exe
src/get-archive-name.o src/Archive.la
/usr/local/lib/libgetopt++.la -lm -lboost_regex
g++-2 -g -O2 -o get-archive-name.exe src/get-archive-name.o
src/.libs/Archive.a -L/usr/lib -L/usr/lib/w32api
-L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10 -lgcc
-lgcc -lgcc -lgcc -lgcc -lgcc -lgcc -lgcc -lgcc -lgcc -lgcc -lgcc
/usr/local/lib /libgetopt++.dll.a -lstdc++-2 -lgcc -lcygwin
-luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc -lboost_regex
-L/usr/local/lib -L/usr/local/lib
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10/libstdc++-2.a(filebuf.o)(.text
+0x2a8):
filebuf.cc: multiple definition of `filebuf::~filebuf(void)'
/usr/local/lib/libgetopt++.dll.a(d000031.o)(.text+0x0): first defined
here
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10/libstdc++-2.a(streambuf.o)
(.text+0x35c):streambuf.cc: multiple definition of `streambuf::sungetc(void)'
/usr/local/lib/libgetopt++.dll.a(d000485.o)(.text+0x0): first defined
here
collect2: ld returned 1 exit status
make: *** [get-archive-name.exe] Error 1
http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -