• 12
• 10
• 10
• 13
• 10

# Makefile problem?

This topic is 4628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello! I get this(and many others) when i compile my code.

33 C:\Spillutv\Kode\Dev-Cpp\Pong\Makefile.win [Warning] overriding commands for target main.o'


I have no idea of what it is. I have never experienced something like this before. Can you help me? Shall i post my code? Thanks in advance!

##### Share on other sites
Did you write the makefile (makefile.win) yourself or did Dev-C++ write it? If the latter, chances are it's a Dev-C++ bug (it is still a beta product, you know). If you want to post the contents of Makefile.win, though, it might help.

##### Share on other sites
Ok, here it goes:

# Project: Project1# Makefile created by Dev-C++ 4.9.9.2CPP  = g++.exeCC   = gcc.exeWINDRES = windres.exeRES  = OBJ  = main.o main.o $(RES)LINKOBJ = main.o main.o$(RES)LIBS =  -L"C:/Spillutv/Kode/Dev-Cpp/lib" -mwindows -lmingw32 -lSDLmain -lSDL  INCS =  -I"C:/Spillutv/Kode/Dev-Cpp/include" CXXINCS =  -I"C:/Spillutv/Kode/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Spillutv/Kode/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Spillutv/Kode/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Spillutv/Kode/Dev-Cpp/include/c++/3.4.2"  -I"C:/Spillutv/Kode/Dev-Cpp/include" BIN  = pong.exeCXXFLAGS = $(CXXINCS) CFLAGS =$(INCS)  RM = rm -f.PHONY: all all-before all-after clean clean-customall: all-before pong.exe all-afterclean: clean-custom	${RM}$(OBJ) $(BIN)$(BIN): $(OBJ)$(CPP) $(LINKOBJ) -o "pong.exe"$(LIBS)main.o: main.cpp	$(CPP) -c main.cpp -o main.o$(CXXFLAGS)main.o: main.cpp	$(CPP) -c main.cpp -o main.o$(CXXFLAGS)`

##### Share on other sites
That explains it. See the exact duplication in the last 2 lines? Getting rid of them should solve the problem. And the problem probably is a bug in Dev-C++, which is why getting rid of them will only probably solve the problem.

Heh.

-Twilight Dragon

EDIT FOR CLARIFICATION: Delete them = delete the last two lines, retaining the next to last pair of lines that were duplicated.

[Edited by - TDragon on July 19, 2005 10:59:35 AM]

##### Share on other sites
Why is his code box so long?

Anyways, shouldn't he delete only 1 of those?