-
December 27th, 2005, 02:41 PM
#1
Makefile.win error
hi again fellows.
I have a program that plays a sound. The code(I think) is right, but when I compile, the compiler shows this. I don't understand makefile errors. I'm using the Dev-C++ 4.9.9.2:
Code:
C:\Documents and Settings\Alex\Desktop\DirectSound\Makefile.win [Build Error] [DirectSound.exe] Error 1
My makefile is this:
Code:
# Project: DirectSound
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = DirectMain.o $(RES)
LINKOBJ = DirectMain.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
../../../../Dev-Cpp/lib/libgdi32.a
../../../../Dev-Cpp/lib/libdsound.a
../../../../Dev-Cpp/lib/libdxguid.a
../../../../Dev-Cpp/lib/libd3d8.a
../../../../Dev-Cpp/lib/libd3dx8d.a
../../../../Dev-Cpp/lib/libd3dxof.a
../../../../Dev-Cpp/lib/libdplayx.a
../../../../Dev-Cpp/lib/libwinmm.a
../../../Dev-Cpp/lib/libdxapi.a
../../../Dev-Cpp/lib/libwsock32.a
../../../Dev-Cpp/lib/libdinput8.a
../../../Dev-Cpp/lib/dinput.lib
../../../Dev-Cpp/lib/strmiids.lib
../../../../Dev-Cpp/lib/libdxapi.a
../../../../Dev-Cpp/lib/libwsock32.a
../../../../Dev-Cpp/lib/libdinput8.a
../../../../Dev-Cpp/lib/libdinput.a
../../../../Dev-Cpp/lib/libstrmiids.a
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 = DirectSound.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before DirectSound.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "DirectSound.exe" $(LIBS)
DirectMain.o: DirectMain.cpp
$(CPP) -c DirectMain.cpp -o DirectMain.o $(CXXFLAGS)
Thanks for the help.
-
December 28th, 2005, 05:18 AM
#2
Re: Makefile.win error
Is it the first time you are compiling with these libraries?
Have you successfully compiled and linked a previous version of your software?
What looks strange to me are the lines starting with ../../../../Dev-Cpp/lib/libgdi32.a and ending with ../../../../Dev-Cpp/lib/libstrmiids.a.
You shouldn't have both -lgdi32 and ../../../../Dev-Cpp/lib/libgdi32.a.
You shouldn't have both ../../../Dev-Cpp/lib/libdxapi.a and ../../../../Dev-Cpp/lib/libdxapi.a
Try with a simpler version, e.g.:
Code:
# Project: DirectSound
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = DirectMain.o $(RES)
LINKOBJ = DirectMain.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -ldsound -ldxguid -ld3d8 -ld3dxd8d -ld3dxof -ldplayx -lwinmm -ldxapi -lwsock32 -ldinput8 -ldinput -lstrmiids
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 = DirectSound.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before DirectSound.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "DirectSound.exe" $(LIBS)
DirectMain.o: DirectMain.cpp
$(CPP) -c DirectMain.cpp -o DirectMain.o $(CXXFLAGS)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|