-1

This is my structure:

  • Makefile
  • src/main.cpp
  • include/xml.hpp

My Makefile looks like this:

# Define compiler: gcc for C program, define as g++ for C++
CC = g++

# Compiler flags:
#  -g    adds debugging information to the executable file
#  -Wall turns on most, but not all, compiler warnings
CFLAGS  = -g -Wall

# Build target executable:
TARGET = main

all: $(TARGET)

$(TARGET): $(TARGET).c
  $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c

clean:
  $(RM) $(TARGET)

The error I get is this:

15 *** missing separator.  Stop.

I copied this code from a tutorial so I'm not sure where I have gone wrong.

halfer
  • 19,824
  • 17
  • 99
  • 186
Jimmy
  • 12,087
  • 28
  • 102
  • 192

1 Answers1

3

You're using spaces instead of tabs.

The parser doesn't like that.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521
deW1
  • 5,562
  • 10
  • 38
  • 54