Operating System - Linux
1828340 Members
3465 Online
109976 Solutions
New Discussion

"/usr/include/strings.h", line 52: error 1000: Unexpected symbol: "(".

 
Dima Rusyy
New Member

"/usr/include/strings.h", line 52: error 1000: Unexpected symbol: "(".

Hello!

I am compiling with HPUX cc compiler using the following command:

----
/opt/ansic/bin/cc -c +DAportable +DS1.1 -DUSE_MOTIF -I./src -I./ tests/gui_test_motif.c -o tests/gui_test.o
----

but get the following error:

----
cc: "/usr/include/strings.h", line 52: error 1000: Unexpected symbol: "(".
cc: "/usr/include/strings.h", line 52: error 1573: Type of "size_t" is undefined due to an illegal declaration.
----

However, when I use the following line:
/opt/ansic/bin/cc -c -Aa +e -z +DA1.0 +DS1.1 -DUSE_MOTIF ...

it compiles and links ok. Can somebody help me in problem?

Thanks!
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: "/usr/include/strings.h", line 52: error 1000: Unexpected symbol: "(".

> I am compiling with HPUX cc compiler [...]

Compiling what? Have you a small test case?

Compiler version? HP-UX version? Hardware
type?

Knowing nothing, it looks as if you're
declaring/defining size_t in an interesting
way. (Conditionally.)
Dennis Handly
Acclaimed Contributor

Re: "/usr/include/strings.h", line 52: error 1000: Unexpected symbol: "(".

>I am compiling with HP-UX cc

You need to mention which version of HP-UX and/or provide what is on line 52 of <strings.h>.

Also, why are you using a non-standard header <strings.h>? The correct ANSI C one is <string.h>.

You should NOT be using +DA1.0. The last OS release it was valid is 10.10. Also use +DS2.0.

>when I use the following line: cc -c -Aa +e

Chances are you are running into an evil macro.
Compile with -E and look at that line and you'll probably see that you have an evil macro expansion for bcopy.

Using -Aa makes <strings.h> the same as <string.h> so you don't have problems.