CC compiler problem with <string.h>
Hi,
I use Sun Studio Express (3-Dec-2006 Build) on SUSE Linux 10.1.
When I was trying to compile the following code, I got an error message regarding <string.h>. The same codes works fine with g++ compiler.
Please give me some comments on that.
Thanks.
Tae-Suk Bae
-
#include <stdio.h>
#include <string.h>
int main(int argc, char**argv) {
char str[80];
strcpy(str,"Test");
printf("%s\n",str);
return 0;
}
-
CC-c -g -o build/Debug/Sun-Linux-x86/welcome.o welcome.cc
(/home/baezae/ngsode/Welcome1)welcome.cc:
"/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.
"welcome.cc", line 30: Error: "}" expected instead of "end of file".
6 Error(s) detected.
-

