when I try to compile a program, an error of the following comes up:

cc -Aa -g -c -o main.o main.c
<command-line>: error: missing '(' after predicate
make: *** [main.o] Error 1

it indicate no line of where the error is located. has anyone ever came across this type of error before?

Recommended Answers

All 3 Replies

You could help us out and post the code.

Are you sure you have a hard tab (not just leading space) before your compiler command line?

Makefiles are very fussy on this issue, and if it isn't an actual target command, then it might be being interpreted as a rule expression instead (specifically, -o would be 'or' )

> it indicate no line of where the error is located.
No, it says command line.
So it's not IN your code, but just before you get to it.
Look at your makefile, and the command lines it generates.
Consider the various make debug options to make it show more information.

You could help us out and post the code.

that wouldn't help anything, but rather just add confusion to the issue.

this is a problem with the command line arguments he is using for the cc compiler. could be a problem with case-sensitivity in the arguments. could be a problem in a makefile.

i don't use the cc compiler, so i dont have a quick answer, but posting the code will be counter-productive.


.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.