public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/10633: linking error with stdc++ library
@ 2003-05-06 13:36 Philip Cheng
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Cheng @ 2003-05-06 13:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/10633; it has been noted by GNATS.

From: Philip Cheng <cheng@pcigeomatics.com>
To: bangerth@dealii.org,  <cheng@pcigeomatics.com>,  <gcc-bugs@gcc.gnu.org>, 
     <gcc-prs@gcc.gnu.org>,  <nobody@gcc.gnu.org>,  <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: libstdc++/10633: linking error with stdc++ library
Date: Tue, 6 May 2003 09:30:40 -0400 (EDT)

 Thanks for your reply!   I tried it with g++ and I got the following
 error
 
 test.cpp:
 
 void operator delete[](void * pPtr) throw()
 {
 }
 
 gcc -c test.cpp
 
 g++ -lc -lstdc++ -shared test.o -o test.so
 /usr/bin/ld: test.so: undefined versioned symbol name operator 
 delete[](void*)@@GLIBCPP_3.2
 /usr/bin/ld: failed to set dynamic section sizes: Bad value
 
 Could you tell why?  I did not get any error in gcc 3.1.
 
 Thanks
 
 Philip
 
 On 5 May 2003 bangerth@dealii.org wrote:
 
 > Synopsis: linking error with stdc++ library
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: bangerth
 > State-Changed-When: Mon May  5 22:41:46 2003
 > State-Changed-Why:
 >     You must link with g++, rather than trying to do it by
 >     hand using ld directly.
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10633
 > 
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/10633: linking error with stdc++ library
@ 2003-05-06 18:06 Phil Edwards
  0 siblings, 0 replies; 5+ messages in thread
From: Phil Edwards @ 2003-05-06 18:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/10633; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: Philip Cheng <cheng@pcigeomatics.com>
Cc: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/10633: linking error with stdc++ library
Date: Tue, 6 May 2003 14:04:16 -0400

 On Tue, May 06, 2003 at 09:30:40AM -0400, Philip Cheng wrote:
 > 
 > gcc -c test.cpp
 > 
 > g++ -lc -lstdc++ -shared test.o -o test.so
 
 If you are trying to make a shared library, the commands are
 
     gcc -c -fPIC test.cpp
     g++ -shared -fPIC test.cpp -o test.so
 
 as described in the FAQ here:
 
     http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4_dlsym
 
 -- 
 If ye love wealth greater than liberty, the tranquility of servitude greater
 than the animating contest for freedom, go home and leave us in peace.  We seek
 not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
 and may posterity forget that ye were our countrymen.            - Samuel Adams


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/10633: linking error with stdc++ library
@ 2003-05-06 14:26 Wolfgang Bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bangerth @ 2003-05-06 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/10633; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Philip Cheng <cheng@pcigeomatics.com>
Cc: gcc-bugs@gcc.gnu.org, <gcc-prs@gcc.gnu.org>, <nobody@gcc.gnu.org>,
   <gcc-gnats@gcc.gnu.org>
Subject: Re: libstdc++/10633: linking error with stdc++ library
Date: Tue, 6 May 2003 09:22:03 -0500 (CDT)

 > g++ -lc -lstdc++ -shared test.o -o test.so
 
 There's no need for the two -l... switches. If you drop them, everything 
 works fine. g++ will do all this stuff for you, there's no reason to make 
 it more complicated than necessary!
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                                www: http://www.ices.utexas.edu/~bangerth/
 
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/10633: linking error with stdc++ library
@ 2003-05-05 22:41 bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2003-05-05 22:41 UTC (permalink / raw)
  To: cheng, gcc-bugs, gcc-prs, nobody

Synopsis: linking error with stdc++ library

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Mon May  5 22:41:46 2003
State-Changed-Why:
    You must link with g++, rather than trying to do it by
    hand using ld directly.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10633


^ permalink raw reply	[flat|nested] 5+ messages in thread

* libstdc++/10633: linking error with stdc++ library
@ 2003-05-05 21:46 cheng
  0 siblings, 0 replies; 5+ messages in thread
From: cheng @ 2003-05-05 21:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10633
>Category:       libstdc++
>Synopsis:       linking error with stdc++ library
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 05 21:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     cheng@pcigeomatics.com
>Release:        unknown-1.0
>Organization:
>Environment:
gcc 3.2.3 on RedHat 8.0
>Description:
undefined symbol while linking with stdc++ library
>How-To-Repeat:
Here is a simple example

test.cpp:

void operator delete[](void * pPtr) throw()
{
}

gcc -v -g -c test.cpp

ld -lc -lstdc++ -shared test.o -o test.so

ld: test.so: undefined versioned symbol name _ZdaPv@@GLIBCPP_3.2
ld: failed to set dynamic section sizes: Bad value
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-06 18:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 13:36 libstdc++/10633: linking error with stdc++ library Philip Cheng
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06 18:06 Phil Edwards
2003-05-06 14:26 Wolfgang Bangerth
2003-05-05 22:41 bangerth
2003-05-05 21:46 cheng

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).