[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

G++ and exception handling



Hi everybody,
                            I am trying to write a C++ program which throw
exceptions. I am using g++
version 2.7.2.  The programs compile ok.  However, when it comes to linking
that is a different
matter.  The linker complains of an undefined symbol: ___unwind_function.

I have determined that its definition is:
    void __unwind_function(void*);

I therefore declared a function in the global memory space:
    void __unwind_function(void* p){};

This then links ok but when the program is run it hangs when an exception is
thrown.

Now my problems are:
1.    Shouldn't this already be defined in the library.
2.    How do I make it work?

Any and all replies welcome, Andrew.