cs.man.ac.uk
Typical compile-time errors
Here are the commoner error messages that you may see, with some hints as to what to do about them. Often, correcting one problem gets rid of several error messages, so fix as many as you can using these hints and your knowledge of C. If you still have error messages that aren't in this list, email me.
Here are the commoner error messages that you may see, with some hints as to what to do about them. Often, correcting one problem gets rid of several error messages, so fix as many as you can using these hints and your knowledge of C. If you still have error messages that aren't in this list, email me.
This is because you have spaces in your makefile where you should have tabs, on the previous line to the line number reported e.g. CC=gcc
test: two
two
^^^^^^^^.................. this is a tab
two: two.c
$(CC) -o two two.c
^^^^^^^^.................. but these are spaces - replace them by a tab
The first character on the lines containing commands must be a tab.
test: two
two
^^^^^^^^.................. this is a tab
two: two.c
$(CC) -o two two.c
^^^^^^^^.................. but these are spaces - replace them by a tab
The first character on the lines containing commands must be a tab.