www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/10/09:21:58

Date: Wed, 10 Sep 1997 09:18:24 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: edkiser AT southeast DOT net
Cc: djgpp AT delorie DOT com
Subject: Re: Problem: exception handling and optimizations don't mix
In-Reply-To: <873577006.32607@dejanews.com>
Message-Id: <Pine.D-G.3.91.970910091002.29339A-100000@dg1>
Mime-Version: 1.0

On Sat, 6 Sep 1997 edkiser AT southeast DOT net wrote:

> Whenever I compile a C++ program with -fhandle-exceptions and -O3, -O2,
> sometimes even -O1, everything compiles perfectly, then I get linker
> errors to the effect that a bunch of symbols of the form L<nnnnn> don't
> exist. Here's an example:
> 
> gcc -S parity.cpp -o parity.s -Wall -fhandle-exceptions -m486 -O6
> gcc -c parity.s -o parity.o -Wall -fhandle-exceptions -m486 -O6
> gcc parity.o -o parity.exe -lstdcxx -s
> parity.o(.text+0x320):parity.cc: undefined reference to `L3167'

Why are you compiling to assembler first.  Also I do not recognise the
'-s' option to gcc in your link phase invokation of gcc.  Anyway, the
undefined references look like compiler generated labels to me.  Does
this compile directly to object code?  Try the following and report back:

gcc -c parity.cpp -o parity.o -Wall -fhandle-exceptions -m486 -O6
gcc parity.o -o parity.exe -lstdcxx

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


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