Exception handeling [Archive] - C Board

PDA

View Full Version : Exception handeling


rip1968
07-31-2002, 02:27 PM
Does g++ support exception handling if so how do I enable it?

I tried g++ -fexceptions myfile.cpp

also in kdevelop I set the compiler varible but was not able to get the prog to compild correctly
the error message says use the -fexceptions flag but at the samd time the -fno-exceptions flag is on and I don't know how to disable it in kdevelop

Unregistered
08-18-2002, 01:46 PM
If you mean by exceptions using 'try' 'catch' & 'throw', I have never needed to enable anything. I just use something like:
g++ myfile.cpp, or probably g++ -g -c myfile.cpp. ( -g turns on debug, -c means compile only, don't link).

rip1968
08-21-2002, 12:00 PM
That is exactly what I meant. Thanks for your response!