Mail Archives: cygwin/2002/10/29/00:01:03
Dear Danny,
From your analysis of the problem I presented, I concluded that including
the libstdc++.a library when compiling cpp programs with gcc-3.2-1, might solve
the problem. I tried this and can now report the following.
The command
gcc -O2 -mno-cygwin -mwindows short.cpp \
-lkernel32 -luser32 -lgdi32 -lwinspool -lstdc++ \
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 \
anv.res -o short
produces the following error messages with gcc-3.2-1
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x2f8):short.cpp: undefined reference to `operator new(unsigned)'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x329):short.cpp: undefined reference to `__cxa_begin_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x355):short.cpp: undefined reference to `__cxa_end_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x367):short.cpp: undefined reference to `__cxa_begin_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x39d):short.cpp: undefined reference to `__cxa_end_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x3aa):short.cpp: undefined reference to `operator delete(void*)'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.text+0x3bf):short.cpp: undefined reference to `__cxa_end_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.data$_ZTI12WinException+0x0):short.cpp: undefined reference to `vtable for __cxxabiv1::__class_type_info'
/DOCUME~1/Mark/LOCALS~1/Temp/ccj6o4RG.o(.eh_frame+0x12):short.cpp: undefined reference to `__gxx_personality_v0'
make: *** [short] Error 1
However, I discovered that without the -mno-cygwin option, things compile
and run perfectly. Is it possible that a different libstdc++.a is used with the
-mno-cygwin option?
--mark
--
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 -