Public Group

# How Do I set Up Dev-C++, Or Codeblocks IDE to use the DirectX SDK?

This topic is 4489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
If you want to use DevCpp take a look at this thread. If you run into any more troubles, just let us know, good luck!

##### Share on other sites
Quote:
 Original post by muffinheadI cannot afford to buy expensive IDE's like microsoft visual studio

You can't afford something that's free?

You can do what you want to do with Dev-C++ or Code::Blocks, but it'll take some work. You might want to look of DirectX "DevPaks" for Dev-C++, although they should also work for Code::Blocks since they use the same compiler.

Edit: Err nevermind. Listen to Drew.

##### Share on other sites
I knew the beta of Visual Studio 2005 was free, But I thought that ended last year. Anyways it was hard enough for me to download the directX SDK, On Dial Up With Download Accelerator Plus, let alone the visual studio beta.

Thank you though, I'll have a look at the thread you mentioned, I hope it's a little more cleary explained than nexe's website, Because I'm a beginer at all of this, So I have a little more difficult time understanding it, But am willing to put forth the effort to learn. Thanks a bunch.

##### Share on other sites
Sorry I'm Double Posting, but I followed the direction's on the link that
Drew_benton gave, I downloaded the mingw runtime libraries/utilities, the d3dx9d.dll, and linked the necessary libraries, but when I go to test if it's set up correctly by trying to compile the d3d simple basecode off of nehe's website, I get tons of compile errors such as,

"Dx9/D3dx9.h: No such file or directory", "Dx9/D3d9.h: No such file or directory",

C:\Documents and Settings\***\My Documents\My Completed Downloads\nehed3d_simple\nehed3d_simple\Simple Basecode\Main.cpp LPDIRECT3D9' does not name a type,

C:\Documents and Settings\***\My Documents\My Completed Downloads\nehed3d_simple\nehed3d_simple\Simple Basecode\Main.cpp LPDIRECT3DDEVICE9' does not name a type,

C:\Documents and Settings\***\My Documents\My Completed Downloads\nehed3d_simple\nehed3d_simple\Simple Basecode\Main.cpp In function void ReSizeD3DScene(int, int)': ,

C:\Documents and Settings\***\My Documents\My Completed Downloads\nehed3d_simple\nehed3d_simple\Simple Basecode\Main.cpp D3DXMATRIXA16' undeclared (first use this function).

I also get a lot of other compile errors also, but am not going to list them.
Is there a special syntax that Dev-C++ uses or codeblocks IDE uses, that makes traditional C++ Syntax not compatable with Dev-C++ or Codeblocks?

I Tried finding a Dev-C++ Translation of the D3D Simple Basecode, but there wasn't any.

If Someone can help me with this problem, I'd really appreciate it, Thanks a bunch.

If it helps any I'm using the latest DirectX SDK (Febuary 2006), Dev-C++ beta 5 (4.9.9.2), and Codeblocks v1.0 release candidate 2. Thanks a bunch once again if you can help me.

[Edited by - muffinhead on April 2, 2006 1:52:54 PM]

##### Share on other sites
Quote:
 Original post by muffinheadI followed the direction's on the link that Drew_benton gave, I downloaded the mingw runtime libraries/utilities, the d3dx9d.dll, and linked the necessary libraries, but when I go to test if it's set up correctly by trying to compile the d3d simple basecode off of nehe's website, I get tons of compile errors such as

That is just because your header files are not being included properly. If you look at the project that I linked to at the end of my post, you will see that all I did was put an absolute path:
#include "C:\Program Files\Microsoft DirectX SDK (December 2005)\Include\d3d9.h"#include "C:\Program Files\Microsoft DirectX SDK (December 2005)\Include\d3dx9.h"

Because that is where my header files are. You will need to do the same, just use your absolute path to your Feb SDK, and your problems should go away. Give that a try and let us know!

##### Share on other sites
Quote:
Original post by Drew_Benton
Quote:
 Original post by muffinheadI followed the direction's on the link that Drew_benton gave, I downloaded the mingw runtime libraries/utilities, the d3dx9d.dll, and linked the necessary libraries, but when I go to test if it's set up correctly by trying to compile the d3d simple basecode off of nehe's website, I get tons of compile errors such as

That is just because your header files are not being included properly. If you look at the project that I linked to at the end of my post, you will see that all I did was put an absolute path:
#include "C:\Program Files\Microsoft DirectX SDK (December 2005)\Include\d3d9.h"#include "C:\Program Files\Microsoft DirectX SDK (December 2005)\Include\d3dx9.h"

Because that is where my header files are. You will need to do the same, just use your absolute path to your Feb SDK, and your problems should go away. Give that a try and let us know!

I Did As You Said and included my absolute path in the code, to the DirectX SDK, But I am still getting compile errors. I think I may not Be linking the libraries Properly, and Including the Include Files From the DirectX SDK Properly. That thread On How to set it up, didn't mention how to link the Libraries, and Include the include file's from the SDK. Maybe you might be able to tell me how.

I Would like to know the Instructions on how to link the libraries and Include the Include Files From The SDK Properly, In the Codeblocks IDE, And Dev-C++ If Possible.

Yes I read your Post in the other Thread, and I couldn't grab the concept on how to link the libraries, and include files from the SDK, as It didn't explain on how to do this.

I don't want to feel like an total Failure, and Have Been really Looking Forward to game deving for a long time. I'm New to all this, but am willing to take the time, and Put forth the effort to learn, and become successful at this.

I really want to learn How to create the games, for so long that I Played, and Seems Like a Challenge for me. I'm Starting out small and working my way Up.

If you can Help me once again, that would be great, and Thanks a bunch once again. Sorry If I'm a Bother, I don't mean to be, but this is all new to me, and quite confusing. I have had some Programming experience in college, but not much because of dropping out, But plan on going back to finish my degree Very Soon.

##### Share on other sites
Quote:
 Original post by muffinheadI Would like to know the Instructions on how to link the libraries and Include the Include Files From The SDK Properly, In the Codeblocks IDE, And Dev-C++ If Possible.

For DevCpp, take a look at my post here at step #8. It tells how to link in the libraries. Make sure that you use the libraries that I mentioned on the other thread:
Quote:
 10. For any new project you make you will need to link in these libs:-lmingw32-ldxguid-ld3dx9d-ld3d9

So, once you do that, all you have to do is make sure that you #include your header files for the DirectX files. After that, it should work.

If you are still having troubles, use that project that I made on the other thread. All you have to do is change the #includes to reflect where your header files are. See if you can get that to work, let us know if you run into any other problems. Good luck!

##### Share on other sites
I believe he was referring to Visual C++ Express edition which is free ;-) and only about 50mb

##### Share on other sites
Thanks Drew, I Think I finally got it set up right, however there are some minor errors with compiling the simple base code, Like when I go to compile it, It say's In the compiler output/Info box, "Warning: No new line at end of file", However It Compiles successfully anyway, and I'm able to run the compiled Simple basecode app.

What does "Warning: No new line at end of file", Mean anyways?

However Thanks for the help, and Hopefully now I can get started, I'll Post back If I run into any more major problems again.

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
16
5. 5

• 14
• 29
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002291
×