DirectX file errors o.O

Started by
1 comment, last by SonicD007 17 years, 1 month ago
School is ending, and I decided to get back into my programming. I'm trying to learn DirectX, so I took an example off the CD from my book and tried to compile it after putting directx in and all. its DirectX9.0b. Right now I'm downloading DirectX10 to see if that fixes my problem, but in the mean time, can someone tell me how to fix this error, and whats causing it etc. (I like to learn from mistakes) This is the error the compiler gives off from the directx file: (Dev-C++ v 4.9.8.0 IDE mingw or w.e its called compiler)

In file included from C:/Dev-Cpp/include/d3dx9mesh.h:15,
                 from C:/Dev-Cpp/include/d3dx9.h:47,

                 from winmain.cpp:7:
C:/Dev-Cpp/include/dxfile.h:240: stray '\32' in program

In file included from C:/Dev-Cpp/include/d3dx9mesh.h:15,
                 from C:/Dev-Cpp/include/d3dx9.h:47,

                 from winmain.cpp:7:
C:/Dev-Cpp/include/dxfile.h:240:2: warning: no newline at end of file

make.exe: *** [winmain.o] Error 1

Execution terminated

If theres anything else I can post to that can help you help me solve this issue, please let me know. (Will also tell you guys if DirectX 10 works without any problems)
Advertisement
C:/Dev-Cpp/include/dxfile.h:240:2: warning: no newline at end of file

old strict gcc compilers require an empty line at the end of each file:

so... either suppress the warning or go to each file, put your cursor at the end and press enter.

-me
Thanks. That problem is done and now I have undefined errors which are probably because something isn't included, but I got the project straight from the book so everything should be there. Maybe theres a certain file needed for the following error:
Executing  make...make.exe -f "C:\Documents and Settings\user\Desktop\Games trying to program\DirectX\load_bitmap\Makefile.win" allg++.exe -c winmain.cpp -o winmain.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/DX90SDK/Include/DShowIDL" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS g++.exe winmain.o  -o "load_bitmap.exe" -L"C:/Dev-Cpp/lib" -L"C:/DX90SDK/Lib" -mwindows -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32winmain.o(.text+0x258):winmain.cpp: undefined reference to `Direct3DCreate9@4'winmain.o(.text+0x3c4):winmain.cpp: undefined reference to `D3DXLoadSurfaceFromFileA@32'make.exe: *** [load_bitmap.exe] Error 1Execution terminated





Forget all of the above. I decided to try using visual studio and it compiled without errors. only one warning which I'm going to ask on the IRC if anyone knows how to fix it. Thanks everyone

[Edited by - SonicD007 on March 9, 2007 7:28:37 PM]

This topic is closed to new replies.

Advertisement