delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/29/00:01:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <EmmesTechnologies20020001171827.27742@EMMES1>
Date: Tue, 29 Oct 2002 00:01:17 -0500
From: Mark Schoenberg <mark AT emmestech DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Problem compiling cpp programs with gcc-3.2-1

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019