Advertisement Jump to content
Sign in to follow this  

Makefile problem?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

33 C:\Spillutv\Kode\Dev-Cpp\Pong\ [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 this post

Link to post
Share on other sites
Did you write the makefile ( 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, though, it might help.

Share this post

Link to post
Share on other sites
Ok, here it goes:

# Project: Project1
# Makefile created by Dev-C++

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
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.exe
RM = rm -f

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

all: all-before pong.exe all-after

clean: 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 this post

Link to post
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.


-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 this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!