public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: nirav.dalal@teradyne.com
To: Danny Smith <dannysmith@users.sourceforge.net>
Cc: gcc-help@gcc.gnu.org
Subject: RE: Exception Handling switch gives linking problems
Date: Fri, 12 Mar 2004 00:03:00 -0000	[thread overview]
Message-ID: <OFD9BF3A48.2D3F2DBF-ON85256E54.0064B63A-85256E54.00661D9D@corp.teradyne.com> (raw)


Thanks Danny,

That just worked for me :))

- Nirav



                                                                                                                            
                      Danny Smith                                                                                           
                      <dannysmith@clea         To:      gcc-help@gcc.gnu.org                                                
                      r.net.nz>                cc:      nirav.dalal@teradyne.com                                            
                                               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





             reply	other threads:[~2004-03-11 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12  0:03 nirav.dalal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-03-09  2:09 Danny Smith
2004-03-08 19:40 nirav.dalal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFD9BF3A48.2D3F2DBF-ON85256E54.0064B63A-85256E54.00661D9D@corp.teradyne.com \
    --to=nirav.dalal@teradyne.com \
    --cc=dannysmith@users.sourceforge.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).