X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Silver Newsgroups: comp.os.msdos.djgpp Subject: Re: throwing an int does not work Date: Wed, 30 Jan 2002 18:05:08 +0100 Organization: Private Lines: 43 Message-ID: <3C5827B9.91A82732@gmx.de> References: <3C583810 DOT 15701 DOT 1A221B3 AT localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1012410609 01 28980 -2tjT0EXS3Y5GK 020130 17:10:09 X-Complaints-To: abuse AT t-online DOT com X-Sender: 520041811770-0001 AT t-dialin DOT net X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com pavenis AT lanet DOT lv wrote: > > On 30 Jan 2002 at 16:21, Silver wrote: > > > Hi! > > > > Any idea why this code does not link? > > > > int main() > > { > > try > > { > > int x=1; > > throw x; > > } > > catch (int a) > > { > > // Do sth. > > } > > } > > > > The linker responded something like this: > > undefined refernce to __cxa_throw and so on. > > > > Is it a bug or an installation issue? > > I guess You're using gcc-3.0.2 or gcc-3.0.3 > > If You are compiling C++ application, You should link > with libstdcxx.a (or at least libsupcxx.a if You're not using > C++ standard program library). > > Use gpp.exe instead of gcc.exe to avoid need to specify > it in comand line > > Andris You're right, thanks. I'm currently using RHIDE and for some strange reason it didn't call gcc in the way it was supposed to. Bernd F.