Error in compilation of cxx file with C++ compiler version as (CC: Sun C++ 5.9 SunOS_
Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Error in compilation of cxx file with C++ compiler version as (CC: Sun C++ 5.9 SunOS_
Hi All
when I am compiling the cxx file on the system with compiler version (CC: Sun C++ 5.9 SunOS_sparc 2007/05/03) , I am facing the following error:-
/opt/SUNWspro/bin/CC -dy -misalign -xcode=abs64 -xarch=v9 -D__EXTENSIONS__ -Dsun4_R5=1 -I. -Isun4_R5_v -I/home/as185259/ash_iadraid/ash_get_10/IA/PORT/include -I/home/as185259/ash_iadraid/ash_get_10/IA/WV/WV5.3.6-ncr0302/build/include/sun4_R5_v -I/app/oracle/product/10.2.0/client_1/sqllib/public -I/app/oracle/product/10.2.0/client_1/precomp/public -I/opt/informix/include -DSVR4 -O -g p -pta -c MContext.cxx -o sun4_R5_v/MContext.o || \
(rm -f sun4_R5_v.d; false)CC: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs
"/home/as185259/ash_iadraid/ash_get_10/IA/WV/WV5.3.6-ncr0302/build/include/sun4_R5_v/ssmalloc.h", line 97: Error: Only one of a set of overloaded functions can be extern "C".
"/home/as185259/ash_iadraid/ash_get_10/IA/WV/WV5.3.6-ncr0302/build/include/sun4_R5_v/ssmalloc.h", line 99: Error: Only one of a set of overloaded functions can be extern "C".
"/home/as185259/ash_iadraid/ash_get_10/IA/WV/WV5.3.6-ncr0302/build/include/sun4_R5_v/ssmalloc.h", line 101: Error: Only one of a set of overloaded functions can be extern "C".
"/home/as185259/ash_iadraid/ash_get_10/IA/WV/WV5.3.6-ncr0302/build/include/sun4_R5_v/ssmalloc.h", line 102: Error: Only one of a set of overloaded functions can be extern "C".
4 Error(s) detected.
The same file with the same compilation command is getting compiled with compiler version CC: Sun WorkShop 6 update 2 C+ 5.3 2001/05/15 .
Can anyone suggest what should be the resolution:-
/
The type for the malloc routine depends on
the compiler and library that you are using.
/
#if defined(hpux) || defined(sun4_R5) || defined(__GNUC_) || defined(_OS2_)
typedef void MALLOC_PTR;
#else
typedef char *MALLOC_PTR;
#endif
//
//
// User-callable routines.
//
//
// Note: memalign and valloc are broken in that they do not aling
// memory on documented boundaries, and thus do not behave as described
// on the "malloc" manual page. They simply call malloc.
//
//
MALLOC_PTR malloc (MALLOC_SIZE size);
FREE_RETURNS free (MALLOC_PTR data);
MALLOC_PTR realloc (MALLOC_PTR data, MALLOC_SIZE size);
MALLOC_PTR calloc (size_t nelem, size_t elsz);
MALLOC_PTR valloc (unsigned size);
MALLOC_PTR memalign (unsigned alignment, unsigned size);
//
// This memory allocator supports memory allocation inside signal
// handlers. For correct operation, the following functions must be
// called upon entering and exiting signal handlers that allocate
// memory.
//
//
// Set this variable to not 0 (possibly in the debugger) if you want
// to get malloc to check memory data structures very carefully as it
// goes. This may be handy if you are trying to detect a memory
// trasher.
//
// It also causes ssmalloc to abort the program instead of returning
// zero if memory runs out.
//
extern int check_memory_very_carefully;
The comments which were present at the start of the file have been removed , and the error messages are referring to the lines where these functions are declared:- malloc, realloc , valloc and memalign
Last edited by ash_bit2k2; 04-01-2010 at 12:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.