Jump to content
  • Advertisement
Sign in to follow this  
muffinhead

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.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello All, I've Been Interested in game Development for a long time now, and finally want to get started making a game, however I cannot afford to buy expensive IDE's like microsoft visual studio, So I am instead forced to use free compilers and IDE's like Dev-C++ or Codeblocks IDE. I would rather Start Simple game deving with the Codeblocks IDE, than Dev-C++. I downloaded everything I need, the DirectX SDK(Febuary 2006), Blender 3d, for 3d modeling, the Microsoft Platform SDK, the Irrilcht Engine SDK, and the Microsoft Visual C++ Toolkit, to use with Codeblocks:: IDE, to Start learning how to make games. I've Spent Hours upon hours downloading all this with a download accelerator, On 56k Dial-Up. I would really be saddened if I Downloaded all this for nothing, and Can't use it Dev with. I just need to know, how do I set up Specifically the Codeblock's IDE to use the DirectX SDK> Is there Any way to set Codeblocks up to use the directX SDK? ALso is there a way to test whether they are both set up properly, after I finish setting them up? I Checked on nexe's website on how to do this, but the way they explained it on that website, all it did was create confusion for me, I don't understand the reimp command, and everytime I tried to use it, The command prompt or console window said, it was an inoperable command or batch file. I am Currently running windows XP, And Have all the things necessary. If anyone could help me, I'd Really appreciate it, Thanks a Bunch

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by muffinhead
I 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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by muffinhead
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


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 this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
Quote:
Original post by muffinhead
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


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 this post


Link to post
Share on other sites
Quote:
Original post by muffinhead
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.


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 this post


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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!