[EMAIL PROTECTED] (Jack Howarth) writes:

> Mike,
>    Actually the problem appears unrelated to cxa_atexit as neither
> -fuse-cxa-atexit nor -fno-use-cxa-atexit eliminates the problem
> with the throw aborting the program. 
>    I do believe I have found a work-around to the problem which
> identifies the nature of the issue as well. The xplor-nih program
> (xplor) is linked with gcc (since it contains only a single object
> file of c). However shared libraries of c++ and fortran code are
> linked to the main xplor program as well. The main c routine in
> xplor calls a fortran routine in one of its fortran shared libraries
> which in turn calls and returns from c++ code in a c++ shared library.
>   I am able to suppress the aborts on the throw in xplor-nih when
> built under gcc 4.2 if I link the main xplor program with g++ rather
> than gcc. Should this be considered a regression from gcc 4.0/4.1?
> Since the c++ shared libraries are linked with g++ and the fortran
> shared libraries are linked with gfortran, it seemed that the main
> program (containing only a single object file from c code) should
> be linkable with gcc (despite c++ and fortran shared libraries being
> linked in to the main xplor program).

To further narrow this down, try linking with 'gcc -shared-libgcc'.

Yes, if the main program has no C++ code then it should be able to be
linked with gcc.

Reply via email to