Date: Wed, 10 Sep 1997 09:18:24 -0400 (EDT) From: "Art S. Kagel" 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: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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 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