Error in compilation of cxx file on Sun C++ 5.9 SunOS_sparc 2007/05/03)


 
Thread Tools Search this Thread
Operating Systems Solaris Error in compilation of cxx file on Sun C++ 5.9 SunOS_sparc 2007/05/03)
# 1  
Old 03-31-2010
Error in compilation of cxx file on Sun C++ 5.9 SunOS_sparc 2007/05/03)

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:-
Code:
/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 code for the ssmalloc.h file is as under:-

Code:
#ifndef _SSMALLOC_H
#define _SSMALLOC_H

#include <stddef.h>

#if defined(__sparcv9)
namespace ssmalloc {
#endif
#if defined(__cplusplus)
extern "C" {
#endif

/*The type for the malloc routine depends on
the compiler and library that you are using.
*/
#if defined(hpux) || defined(sun4_R5) || defined(__GNUC_[/U]) || defined(_OS2_)
typedef void *MALLOC_PTR;
#else
typedef char *MALLOC_PTR;
#endif

#if defined(__GNUG__)
typedef size_t MALLOC_SIZE;
#else
typedef unsigned MALLOC_SIZE;
#endif

#if defined(sun4) && ! defined(__GNUG__)
# define FREE_RETURNS int
# define FREE_RETURN return 0
#else
# define FREE_RETURNS void
# define FREE_RETURN return
#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.
//

void ssmalloc_enter_signal_level();
void ssmalloc_exit_signal_level();

//
// 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;

#if defined(__cplusplus)
}
#endif

#if defined(__sparcv9)
} // namespace ssmalloc {
#endif
#endif /* _SSMALLOC_H */


Last edited by pludi; 03-31-2010 at 07:37 AM.. Reason: code tags, please...
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File compilation error on AIX

Hi All, I am successfully able to compile the file through gcc. At the time of compilling the file throught xlc, I am facing the following issues: 1) 1540-0836 (S) The #include file <multimap.h> is not found. 2) 1540-0836 (S) The #include file <pair.h> is not found. 3) ld: 0706-012 The... (0 Replies)
Discussion started by: Prajakta
0 Replies

2. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

3. HP-UX

compilation error

hello everyone, here i am attempting to compile a c++ submodule.OS is HP-UX. here i am getting the following error. ====================================== "Make: Don't know how to make compile. Stop." =================================== could you pls somebody suggest why this error is... (2 Replies)
Discussion started by: mannam srinivas
2 Replies

4. Programming

compilation error

Hi, While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of /usr/ccs/bin/as, I get the following error: /usr/ccs/bin/as: No such file or directory /usr/ccs/bin/as: error: write error on output file "<filename>.o" *** Error code 1 clearmake: Error: Build... (2 Replies)
Discussion started by: smanu
2 Replies

5. Programming

Regarding compilation error.

Hi All, I facing the following compilation error; when I implementing the following logic. ostrstream ostr; ostr << (( scAxsm.getRecord( i ).getField( 2 ).getShort())%12)!=0?(( scAxsm.getRecord( i ).getField( 2 ).getShort())/12+1) : (( scAxsm.getRecord( i ).getField( 2 ).getShort())/12) <<... (1 Reply)
Discussion started by: sweta
1 Replies

6. Shell Programming and Scripting

speeding up the compilation on SUN Solaris environment

Dear friends, Please let me know how do I increase the speed of my compilation in SUN Solaris environment. actually I have many subfolders which contains .cc files. when I compile makefile at the root it will take much time to compile all the subfolders and generates object(.o) files. Can... (2 Replies)
Discussion started by: swamymns
2 Replies
Login or Register to Ask a Question