-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,471
  • 17
  • 87
  • 173
Jimmy
  • 11,469
  • 22
  • 92
  • 182

1 Answers1

3

You're using spaces instead of tabs.

The parser doesn't like that.

Jonathan Wakely
  • 160,213
  • 23
  • 318
  • 501
deW1
  • 5,364
  • 10
  • 40
  • 53