RE: Exception Handling switch gives linking problems

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

 



Thanks Danny,

That just worked for me :))

- Nirav



                                                                                                                            
                      Danny Smith                                                                                           
                      <dannysmith@clea         To:      gcc-help@xxxxxxxxxxx                                                
                      r.net.nz>                cc:      nirav.dalal@xxxxxxxxxxxx                                            
                                               Subject: RE: Exception Handling switch gives linking problems                
                      03/08/2004 09:04                                                                                      
                      PM                                                                                                    
                      Please respond                                                                                        
                      to Danny Smith                                                                                        
                                                                                                                            
                                                                                                                            




From: nirav dot dalal at teradyne dot com

------------------------------------------------------------------------
--------

> 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'

< snip >

Tell dllwrap to link in libstdc++ by setting language to C++:

dllwrap --driver-name c++  --dllname=foo.dll foo.o


Better yet, use g++ -shared, instead of dllwrap,   to build the dll

g++  -DBUILD_DLL -O3 -c foo.cpp
g++ -shared -o foo.dll foo.o


Danny






[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