Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Makefile Missing separator. Stop

Tags:

makefile

I have never made a makefile before, but we have been handed this one but, if I try to run it, it just says,

missing separator. stop.

I don't know what could be wrong - and I have made sure that the spaces are made be pressing only tab.

 #Rule for linking
 randomNumbers: randomNumbers.o randomNumbers_functions.o
    cc -o randomNumbers randomNumbers.o randomNumbers_function.o

 # Rule for generating object code myprogram.o
 randomNumbers.o: randomNumbers.c myheader.h
    cc -c randomNumbers.c -std=c99 -Wall

 # Rule for generating object code routine1.o
 randomNumbers_functions.o: randomNumbers_functions.c
    cc -c randomNumbers_functions.c -std=c99 -Wall

I'm not quite sure what a hex a dump is but I found a webpage that can do it, so I think this is it:

0000-0010:  ef bf bc ef-bf bc 20 23-52 75 6c 65-20 66 6f 72  .......# Rule.for
0000-0020:  20 6c 69 6e-6b 69 6e 67-0a 72 61 6e-64 6f 6d 4e  .linking .randomN
0000-0030:  75 6d 62 65-72 73 3a 20-72 61 6e 64-6f 6d 4e 75  umbers:. randomNu
0000-0040:  6d 62 65 72-73 2e 6f 20-72 61 6e 64-6f 6d 4e 75  mbers.o. randomNu
[...]
like image 224
some_name Avatar asked Aug 01 '26 03:08

some_name


1 Answers

You've got some funny bytes at the start of your Makefile:

 ef bf bc ef bf bc

Unicode? Byte-order marks? Something else funny?

Remove these bytes/characters and your Makefile should work.

like image 123
Jens Avatar answered Aug 06 '26 22:08

Jens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!