c++/3193: -G vs ( -shared or -symbolic )

kusi_news@yahoo.com kusi_news@yahoo.com
Fri Jun 15 02:56:00 GMT 2001


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



More information about the Gcc-bugs mailing list