Problem
I was trying to run a Makefile in VSCode and I got the following error:
Makefile:4: *** missing separator. Stop.
Solution
The problem is that the Makefile is using tabs instead of spaces. To fix this, you can:
- Open the Makefile in VSCode
- Open the command palette with
Ctrl + Shift + P
orView > Command Palette
. If you are using a Mac, you can useCmd + Shift + P
- Search for
Convert Indentation to Tabs
If you want to prevent this from happening in the future, you can:
- Open settgings in VSCode with
Ctrl + ,
orFile > Preferences > Settings
. If you are using a Mac, you can useCmd + ,
- Search for
Insert Spaces
- Uncheck the box for
Editor: Insert Spaces