-
An Error
Hi I got this error when trying to compile a GDI window I was making, In the makefile.
Code:
# Project: Project1
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = gdi_private.res
OBJ = "D:/Documents\ and\ Settings/Stephen/Desktop/gdi/main.o" $(RES)
LINKOBJ = "D:/Documents and Settings/Stephen/Desktop/gdi/main.o" $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -mwindows -lgdi32
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:/Dev-Cpp/include"
BIN = gdi.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before gdi.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ) //<<<---This is the line of code that refers to the error
$(CPP) $(LINKOBJ) -o "gdi.exe" $(LIBS)
"D:/Documents\ and\ Settings/Stephen/Desktop/gdi/main.o": D:/Documents\ and\ Settings/Stephen/Desktop/gdi/main.cpp
$(CPP) -c "D:/Documents and Settings/Stephen/Desktop/gdi/main.cpp" -o "D:/Documents and Settings/Stephen/Desktop/gdi/main.o" $(CXXFLAGS)
gdi_private.res: gdi_private.rc D:/Documents\ and\ Settings/Stephen/Desktop/gdi/GDI01.RC
$(WINDRES) -i gdi_private.rc --input-format=rc -o gdi_private.res -O coff
Error:
26 C:\Dev-Cpp\Makefile.win [Build Error] *** multiple target patterns. Stop.
Ive tryed 2 other forums but nobody seems to know what is wrong.
Any ideas =/
--Stephen
-
Come on please, Nobody seems to know anythung about this =[
--Stephen
-
The error is because your target expands to someting like
Code:
ggdi.exe: something D:something_else
Make sees D: as beeing anoter target
must be some missing '"' somewhere. Cannot locate it .
Kurt
-
Kind of lost reading that =/
--Stephen
-
I don't think that you really need all those absolute path in your makefile
Like this it's not generating errors anymore
Code:
# Project: Project1
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = gdi_private.res
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -mwindows -lgdi32
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:/Dev-Cpp/include"
BIN = gdi.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before gdi.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "gdi.exe" $(LIBS)
main.o: main.cpp
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
gdi_private.res: gdi_private.rc GDI01.RC
$(WINDRES) -i gdi_private.rc --input-format=rc -o gdi_private.res -O coff
Kurt
-
Nop, still getting the error
--Stephen
-
The makefile that I posted should be ok ( at least for gnu-make ).
Are you writing the makefile yourself ?
If not I guess the original one got generated again.
Kurt
-
No it just generates.
--Stephen
-
I stopped it from generating but this line of code
Still has this error:
"26 C:\Dev-Cpp\Makefile.win [Build Error] *** multiple target patterns. Stop. "
--Stephen
-
Think best is if you setup a new project, and move your source-files.
I would recommend to use a path without any spaces in the name as well. ( not even Windows itself handles them very well ).
Kurt
-
expands to
Code:
gdi.exe: main.o gdi_private.res
Does that help?
I'm not sure if this works in Windows:
Code:
D:/Documents\ and\ Settings/Stephen/Desktop/gdi/GDI01.RC
Try this instead:
Code:
"D:/Documents and Settings/Stephen/Desktop/gdi/GDI01.R"
But don't get confused and try both:
Code:
"D:/Documents\ and\ Settings/Stephen/Desktop/gdi/main.o"
How are you invoking make? Try
-
Code:
"26 C:\Dev-Cpp\Makefile.win [Build Error] *** multiple target patterns. Stop. "
Code:
OBJ = "D:/Documents\ and\ Settings/Stephen/Desktop/gdi/main.o" $(RES)
Just noticed that the makefile and sources are on different drives even. Unusual I would say.
Must be something wrong with either the setup of the IDE ( compiler ) or your project.
Kurt
-
None of those worked. =[
And Im still getting this error.
--Stephen
-
How are you invoking make?
Code:
all: all-before gdi.exe all-after
all-before and all-after aren't declared.
-
Im new to GDI, I was following a tutorial on it and then this happened and I started seeking help so Im not sure what to do =[
--Stephen