Exception Handling switch gives linking problems

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

 



Hi,

I'm having issues with GCC compiling & linking when I remove "
-fno-exceptions"
switches/option with x86 target.

For example:

Case A] This example works fine.
>gcc -mdll -DBUILD_DLL -O3 -c -fno-exceptions foo.cpp
>dllwrap --dllname=foo.dll foo.o

Case B] This example compiles OK, but does NOT link.
>gcc -mdll -DBUILD_DLL -O3 -c foo.cpp
>dllwrap --dllname=foo.dll foo.o

The "dllwrap" command gives me following error/s:
foo.o(.text+0x28):foo.cpp: undefined reference to `__gxx_personality_sj0'
foo.o(.text+0x24a):foo.cpp: undefined reference to `__gxx_personality_sj0'
foo.o(.text+0x632):foo.cpp: undefined reference to `__gxx_personality_sj0'
dllwrap: gcc exited with status 1

So if I want to remove "-fno-exceptions" or in other words enable exception
handling in GCC, the link command does NOT like it. How else can we enable
exception handling?

Any help on this problem is appreicated.

The GCC version I'm using is:
>gcc --version
gcc (GCC) 3.3.1 (mingw special 20030804-1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks,
- Nirav



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux