Configuring Dev C++ with Direct3d

Started by
6 comments, last by Chad Smith 18 years, 1 month ago
I'm trying to link the lib files with my Direct3d project. http://nexe.gamedev.net/directKnowledge/default.asp?p=DirectX%20Development%20Using%20DevCpp This article explains that I need to convert the lib files to something the compiler for Dev C++ understands. I've read it and certain pieces of it confuse me. A lot of pieces of it. I'm not understanding what the MinGW Utilities or the reimp utility is. So obviously I don't know how to use it. This is the thread I'm coming from if it helps you to understand where I am now. http://www.gamedev.net/community/forums/topic.asp?topic_id=379849
Advertisement
I have actually been wondering about the Utilities also, because I can't figure out where to download it at.


Chad.
Yeah I hadn't heard of them until that article and I need the reimp utility it says to make the .lib files .a files I think.
Here's a quick little guide to this, just made this up. I'll probabally write it nicer later on and submit to Jack or Coder for the NeXe site.

1. The starting article we will be using is from NeXe, link

2. At the top of the article, there's a link to reimp on SourceForge, link

3. Once you click there you are brought to a SF page, click on the name of the utilities, which is mentioned in the NeXe article, MinGW Utilities.

4. Once you click there you are brought to a new download page. Click Download for the "Current Win32" package, link

5. You are brought to the SF download page for this package. There are two items listed, the source and the binaries. You will want to download the binaries, "w32api-3.6.tar.gz", link

6. Now you can select a server and download the file. Once down, you will need a program that can support extracting "tar.gz" files. If you don't want to find a program that does that or don't have one, here's the .zip version on my server.

7. Once you have the file, extract it. You will have a "lib" and a "header" folder. In side the header folder is the header files for the Win32API/OpenGL/DirectX. You can copy paste these into your DevCpp include folder and over write the existing ones. (Don't think there will be any problems) The same applies for the LIB folder as well. Copy those over ot the correct DevCPP folder. I'd make a backup first of the old folders just in case though, I noticed some files in my folder were newer, but I sitll overwrote them.

8. Now that this is all done, you can start development. As you can see, there is no need for reimp or anything like that. So take a sigh of relif and make a new project to test to see if this worked. For this demo, I used Apron's D3D basecode, located on the right side of NeHe's front page. I also took the triagnle code out of this cool site (Who's author happens to also be named Chad [wink]).

9. Since only the debug lib came with the Win32 package we downlaoded, you will need to get a "d3dx9d.dll". I found a copy here that I've included it in my demo project.

10. For any new project you make you will need to link in these libs:
-lmingw32-ldxguid-ld3dx9d-ld3d9

You will need a recent D3D SDK to get the correct header files as well. One of the header files is not part of that Win32 download, so that' why you need it.

11. You should now have a working project. Take a look at mine and see if it works. It did work for me. Note my project won't compile for you if you don't have the December SDK, I hard linked the header files from that path. Dev-D3D Project Here's the accompanying screenshot as well.

Hope this helps [smile] If you need any more help feel free to ask. Good luck!

EDIT: Fixed link overrun

[Edited by - Drew_Benton on March 15, 2006 5:32:57 PM]
Thank you very much Drew! Finally it compiles :D You sure contribute a lot here. I just realized that after editing it it wouldn't compile. I got errors for almost every line on the page.
Quote:Original post by earthHunter
I just realized that after editing it it wouldn't compile. I got errors for almost every line on the page.


Since I compiled it on my computer and have the most recent DXSDK, the object files were out of date when you first compiled it and it worked. After you changed it, the object files were recompiled as normal, but there is some problem. What are your errors? Do you have the current DxSDK downlaoded and installed?
Yes, I have DirectX SDK installed. I compiled that project then I changed the colour of a vertex and tried to compile again but it came up with all kinds of errors like the header files are missing etc. Probably because I have February 2006 one and you have the December 2005 one. I just changed the directory for includes and it is fine, thanks.
Wow Drew, thanks a lot! Now, I can FINALLY start learning DirectX on my spare time! Thanks a lot Drew!

rating++;

Chad.

This topic is closed to new replies.

Advertisement