Sign in to follow this  
Samsonite

Makefile problem?

Recommended Posts

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


Link to post
Share on other sites
TDragon    679
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 this post


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


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

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
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
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
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
TDragon    679
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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this