c code throwing exceptions (gcc)

Started by
1 comment, last by rip-off 18 years, 3 months ago
In my current project we have some legacy mixed language code that is crashing. We isolated it to a piece of code where c function calls a c++ function which throws an exception. This crashes (I assume) because the c functions stack frame isn't setup correctly. With the microsoft compiler you can work around this with the /EH** compiler options, but does anyone know how to the same thing with gcc?
Advertisement
Bugger, I spend all morning trying to find an answer, post my question and then find the answer five minutes later

if anyone was interested you need to enable -fexceptions
is it possible to write a c++ wrapper function that has c-linkage, and catch the exceptions and convert them into return codes or some such, or are the functions part of a library you can't edit?

This topic is closed to new replies.

Advertisement