Problems using Sun Studio Express 3 CC on OpenSuse 10.2

Unable to compile a simple program with CC (compiles w/o errors using g++)

-- test.cpp -

#include <string>

#include <iostream>

using namespace std;

string xx = "Hello World ...";

int main () {

cout << xx << endl;

return 0;

}

--

sunCC -v -o testcc test.cpp

###command line files and options (expanded):

### -v -o testcc test.cpp

### sunCC: Note: NLSPATH

= /opt/sun/sunstudiomars/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/sun/su nstudiom

ars/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat

/opt/sun/sunstudiomars/prod/bin/ccfe -y-o -ytest.o -y-fbe -y/opt/sun/sunstudiomars/prod/bin/fbe -y-xarch=generic -

y-xtab -y-verbose -O0 -ptf /tmp/16306%1.

%2 -ptx /opt/sun/sunstudiomars/prod/bin/CC -ptk "-v -xs " -D__SUNPRO_CC=0

x590 -Dunix -Di386 -D__i386 -D__i386__ -D__unix -D__unix__ -D__BUILTIN_VA_ARG_INCR -D__linux -D__linux__ -Dlinux -

D__gnu__linux__ -D__SUNPRO_CC_COMPAT=5 -xdbggen=no%stabs+dwarf2 -y-s -xdbggen=incl -I-xbuiltin -xldscope=global -i

nstlib=/opt/sun/sunstudiomars/prod/lib/libCstd.a -I/opt/sun/sunstudiomars/prod/include/CC/Cstd -I/opt/sun/sunstudi

omars/prod/include/CC -I/opt/sun/sunstudiomars/prod/include/CC/rw7 -I/opt/sun/sunstudiomars/prod/include/cc -y-com

dat test.cpp -s /tmp/ccfe.16306.0.s >&/tmp/ccfe.16306.1.err

rm /tmp/ccfe.16306.0.s

/opt/sun/sunstudiomars/prod/bin/stdlibfilt -stderr </tmp/ccfe.16306.1.err

"/usr/include/string.h", line 272: Error: End of file encountered in macro

arguments for "__nonnull".

"/usr/include/string.h", line 272: Error: ")" expected instead of "(".

"/usr/include/string.h", line 272: Error: Unexpected ")" -- Check for matching

parenthesis.

"/usr/include/string.h", line 272: Error: Operand expected instead of ";".

"/usr/include/string.h", line 426: Error: "strerror_r(int, char*, unsigned)"

is expected to return a value.

"/opt/sun/sunstudiomars/prod/include/CC/new", line 32: Error: operator

new(unsigned) was declared before with a di

fferent language.

"/opt/sun/sunstudiomars/prod/include/CC/new", line 35: Error: operator

delete(void*) was declared before with a different language.

"/opt/sun/sunstudiomars/prod/include/CC/new", line 37: Error: operator new[]

(unsigned) was declared before with a different language.

"/opt/sun/sunstudiomars/prod/include/CC/new", line 40: Error: operator

delete[](void*) was declared before with a different language.

"/opt/sun/sunstudiomars/prod/include/CC/new", line 53: Error: Only one of a

set of overloaded functions can be extern "C".

"/opt/sun/sunstudiomars/prod/include/CC/new", line 54: Error: Only one of a

set of overloaded functions can be extern "C".

"/opt/sun/sunstudiomars/prod/include/CC/new", line 55: Error: Only one of a

set of overloaded functions can be extern "C".

"/opt/sun/sunstudiomars/prod/include/CC/new", line 56: Error: Only one of a

set of overloaded functions can be extern "C".

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 106: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 169: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 185: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 198: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 202: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 206: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 217: Error:

Only one of a set of overloaded functions can be extern "C".

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 225: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 239: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 249: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 264: Error:

Template declarations cannot have extern "C" linkage.

"/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 275: Error:

Template declarations cannot have extern "C" linkage.

Compilation aborted, too many Error messages.

rm /tmp/ccfe.16306.1.err

rm test.o>

[5000 byte] By [w4nava] at [2007-11-26 17:53:10]
# 1
It is a known bug. Check out this topic: http://forum.java.sun.com/thread.jspa?threadID=5109045Fix for it should be available in the next installment of Sun Studio Express...regards,__Fedor.
SFVa at 2007-7-9 5:06:09 > top of Java-index,Development Tools,Solaris and Linux Development Tools...