missing separator C/C++ Origin: Application & API OSI layer 7 · Application Last updated 15 Oct 2026

Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab)

A line in the Makefile is neither a rule, a variable assignment nor a tab-indented command — nearly always spaces used where a TAB is required.

Exact message you may see missing separatorMakefile:5: *** missing separator. Stop.*** missing separator (did you mean TAB instead of 8 spaces?)recipe commences before first targetMakefile:2: *** commands commence before first target
Seen on: C/C++ Make

Meaning

In a Makefile, the commands under a rule must start with a real tab character. Editors that convert tabs to spaces, copy-pasted examples and YAML-style indentation break it. GNU Make may add "Did you mean TAB instead of 8 spaces?" in newer versions.

Common causes

  • Recipe lines indented with spaces instead of a tab
  • Editor setting "insert spaces" or automatic tab conversion
  • Missing : after a target name or = in an assignment
  • Merge-conflict markers or stray text in the Makefile

⚡ Quick fix

  1. Replace the leading spaces on the reported line with one TAB
  2. Configure your editor to use real tabs for Makefiles
  3. Check the line above for a missing : or \

Detailed fix by platform

Linux

  1. Reveal tabs: cat -A Makefile | sed -n '1,20p' (tabs show as ^I)
  2. Convert indentation: sed -i 's/^ /\t/' Makefile (8 spaces to a tab)

Editor

  1. VS Code: set "editor.insertSpaces": false for the makefile language

Code examples

Tab-indented recipe

make
all: app

app: main.o
	gcc -o app main.o        # <-- this indentation must be a TAB

clean:
	rm -f app *.o

cat -A shows a tab as ^I; four or eight spaces mean the file needs fixing.

How to diagnose

  1. Line — Which line number is reported?
  2. Whitespace — Tab or spaces?
  3. Syntax — Missing colon or equals above?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

C compiler cannot create executables — configure: error: C compiler cannot create executables / no acceptable C compiler found in $PATH (C/C++)C compiler cannot cre…Could not find a package configuration file — CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2) (C/C++)Could not find a pack…does not appear to contain CMakeLists.txt — CMake Error: The source directory does not appear to contain CMakeLists.txt (C/C++)does not appear to co…fatal error: No such file or directory — C/C++: fatal error: foo.h: No such file or directory — #include not found (C/C++)fatal error: No such …Killed signal terminated program cc1plus — g++: fatal error: Killed signal terminated program cc1plus — compilation terminated (out of memory) (C/C++)Killed signal termina…No rule to make target — Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop. (C/C++)No rule to make targetNo targets specified and no makefile found — make: *** No targets specified and no makefile found. Stop. (C/C++)No targets specified …not a member of std — C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard (C/C++)not a member of stdmissing s…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.