0

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?

4
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by jephthah
0

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.

0

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.


.

Edited by jephthah: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.