Sign in to follow this  
CrustyDOD

newbie help, compiling problems all over..

Recommended Posts

Hey, i just started playing with stuff and installed Dev-C++ application for compiling C++. I also installed Direct3D SDK stuff. Now i downloaded and tried compiling tutorial from website: http://www.riaz.de/tutorials/d3d.html#tut02 I downloaded the last one "Tutorial 17: Point Sprites". I then open Dev-C++ application and tried compiling main.cpp and it gives me an error: Compiler: Default compiler Executing g++.exe... g++.exe "D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp" -o "D:\game dev\direct3d tutorials\d3d17\d3d17\main.exe" -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" -L"C:\Dev-Cpp\lib" In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:13:18: d3dx9.h: No such file or directory In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\/capplication.h:9, from D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:16, from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:37:7: warning: no newline at end of file In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:16, from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/capplication.h:73: error: `D3DXMATRIX' does not name a type In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:16, from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/capplication.h:80:7: warning: no newline at end of file In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:17, from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/d3ddefs.h:24:7: warning: no newline at end of file In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:35: error: `D3DXVECTOR3' was not declared in this scope D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:35: error: expected primary-expression before ')' token In file included from D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:6: D:\game dev\direct3d tutorials\d3d17\d3d17\/main.h:37:7: warning: no newline at end of file D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:16: error: `D3DXMATRIX' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:16: error: (Each undeclared identifier is reported only once for each function it appears in.) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:16: error: expected `;' before "matTranslation" D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:47: error: `D3DXCreateTextureFromFile' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:63: error: `matRotation' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:63: error: `D3DXMatrixRotationY' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:64: error: `matTranslation' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:64: error: `D3DXMatrixTranslation' undeclared (first use this function) D:\game dev\direct3d tutorials\d3d17\d3d17\main.cpp:91:11: warning: no newline at end of file Execution terminated Pretty much every single tutorial from that website gives me the same errors, all SDK examples give me similar errors, all other sources/tutorials i tried also give me similar errors. What's going on? Any idea?

Share this post


Link to post
Share on other sites
1.) Make sure you're including all of the necessary headers and linking to the right libs.

2.) Dev-C++ doesn't support DirectX as-is; all of the .lib file in the DX SDK need to be converted to the .a format (you can also just download the free Visual C++ 2005 Express Edition from MSDN to use the .lib files as they are). You can Google around for a utility to do this for you (I believe it was called reimp, but I'm not sure).

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