public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3193: -G vs ( -shared or -symbolic )
@ 2001-06-15 2:56 kusi_news
0 siblings, 0 replies; 2+ messages in thread
From: kusi_news @ 2001-06-15 2:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 3193
>Category: c++
>Synopsis: -G vs ( -shared or -symbolic )
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 15 02:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: kusi_news
>Release: 2.95.3
>Organization:
>Environment:
SunOS HOSTNAME 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-250
>Description:
//fun2.cpp
#include <iostream.h>
class A{
public:
static int funwithaverylongnamesothaticanseeitinthenmlisting( int c ) {
cout << "in fun2-> A::fun" << endl;
return c - 20;
}
};
int fun( int a ) {
cout << "in fun2-> ::fun" << endl;
return a * 20 ;
}
/************************************************/
Compile the above file with the following options
g++ -G fun2.cpp -o fun2.so
ok. compiles and gives the shared object file
g++ -shared fun2.cpp -o fun2.so
not ok. kaput!
g++ -symbolic fun2.cpp -o fun2.so
not ok. kaput!! once again
what's happening?
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/3193: -G vs ( -shared or -symbolic )
@ 2002-04-26 3:45 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-04-26 3:45 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, kusi_news, nobody
Synopsis: -G vs ( -shared or -symbolic )
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Apr 26 03:45:20 2002
State-Changed-Why:
works for 3.0, but you (a) need to add -lc to the -symbolic
version, and (b) you should read http://gcc.gnu.org/faq.html#dso
before you do
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3193
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-26 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15 2:56 c++/3193: -G vs ( -shared or -symbolic ) kusi_news
2002-04-26 3:45 nathan
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).