1

Basically It is supposed to calculate the Federal Income of the user. But anytime I run it to see what is no doubt a baragge of structure errors I get this MakeFile

CPP      = g++.exe
CC       = gcc.exe
WINDRES  = windres.exe
OBJ      = #3.o
LINKOBJ  = #3.o
LIBS     = -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib" -static-libgcc
INCS     = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
CXXINCS  = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
BIN      = HOMEWORK.exe
CXXFLAGS = $(CXXINCS) 
CFLAGS   = $(INCS) 
RM       = rm.exe -f

.PHONY: all all-before all-after clean clean-custom

all: all-before $(BIN) all-after

clean: clean-custom
    ${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
    $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)

#3.o: #3.cpp
    $(CPP) -c #3.cpp -o #3.o $(CXXFLAGS)

Any and all help/advice is appreciated.

  • What is the full error text you are getting? – NathanOliver Feb 19 '20 at 15:27
  • @NathanOliver The full MakeFile is posted above, but if you're asking what it says in the console it says "Recipe for target 'project.exe' failed. –  Feb 19 '20 at 15:31
  • It would be great if you could remove irrelevant code (i.e. most of it) from the question, and post ther actual command and error, as noted by Nathan. See [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask). – Konrad Rudolph Feb 19 '20 at 15:32
  • @NathanOliver Actually it says also "[Error] no input files" –  Feb 19 '20 at 15:33
  • Is this #3.cpp your file name? Any string after # is treated as a comment, thus it breaks your makefile. – 273K Feb 19 '20 at 15:38
  • @S.M. yes it is, oh geez really? well that's dumb on me –  Feb 19 '20 at 15:40

1 Answers1

2

The filename #3.cpp breaks your makefile, makes it invalid, such name is treated as a comment. Rename the file, so # is not used. Surrounding it with quotation marks, "#3.cpp" and "#3.o" does not work in Makefile: GNU makefile how to and when to quote strings

273K
  • 29,503
  • 10
  • 41
  • 64