Home > Enterprise >  C Programming: makefile:2: *** missing separator. Stop
C Programming: makefile:2: *** missing separator. Stop

Time:10-26

My code is a spellchecker program that checks words from an input file and that checks those words from the inputfile with a dictionary file.

I am trying to create a makefile and keep getting this error here makefile:2: *** missing separator. Stop. In Addition, I am writing my code in repl.it.

I don't know what is happening or why it is doing that?

This is my makefile contents:

a.out: main.o spell_lib.o spell.o
  gcc *.o

main.o: main.c spell_lib.h spell_lib.c
     gcc -c main.c

spell_lib.o: spell_lib.h spell_lib.c
    gcc -c spell_lib.c

CodePudding user response:

regarding: gcc *.o

this line must begin with a <tab> not a space

CodePudding user response:

I was able to fix the issue, i just went and copied and pasted my code i had previously created in putty which has the correct indentations.

  • Related