Hack Forums
[C] [Build Error] [main.o] Error 1 (Makefile error) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] [Build Error] [main.o] Error 1 (Makefile error) (/showthread.php?tid=3626166)



[Build Error] [main.o] Error 1 (Makefile error) - A-MAN - Jul 16, 2013

I am using: Dev-C++ 4.9.9.2 on Win 7.

So I am working on this project. And whenever I come to compile it, I get a make file error. Its weird cuz all the other projects compiles correctly. And even when I come to copy some new short code replacing the original one, it compiles perfectly, which is making me more sure that there is some mistake in the code itself. First of all, here is the make file:
Code
# Project: Project1
# Makefile created by Dev-C++ 4.9.9.2

CPP  = g++.exe
CC   = gcc.exe
WINDRES = windres.exe
RES  =
OBJ  = main.o $(RES)
LINKOBJ  = main.o $(RES)
LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/SDL-1.2.15/lib" -mwindows -lmingw32 -lSDLmain -lSDL  
INCS =  -I"C:/Dev-Cpp/include"
CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/SDL-1.2.15/include"
BIN  = A-Engine.exe
CXXFLAGS = $(CXXINCS)  
CFLAGS = $(INCS)  
RM = rm -f

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

all: all-before A-Engine.exe all-after

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

$(BIN): $(OBJ)
    $(CPP) $(LINKOBJ) -o "A-Engine.exe" $(LIBS)

main.o: main.cpp
    $(CPP) -c main.cpp -o main.o $(CXXFLAGS)

The compile log:
Code
Compiler: Default compiler
Building Makefile: "C:\Users\user01\Desktop\A-Studios\C++\SDL\A-Engine\Makefile.win"
Executing  make...
make.exe -f "C:\Users\user01\Desktop\A-Studios\C++\SDL\A-Engine\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/SDL-1.2.15/include"  

make.exe: *** [main.o] Error 1

Execution terminated

The project files:
http://pastebin.com/5BWq8iEJ (main.cpp file)
http://pastebin.com/p3ZjdS8A (Object.h file)

What am I doing wrong this time ?_? ???

Thanks for your time and dedication!