Sign in to follow this  

DirectX Beginner Question

This topic is 3291 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

I'm not sure how "beginner" of a question this is but here goes. I'm revisiting DirectX after a couple years. Last time I gave up mostly due to being inexperienced at any level of in-depth C programming. Now that I've got some experience developing C code from a console, I've got a bit better hang of includes, linking, and compiling in general. So I set myself up with a copy of Dev-Cpp (I'm cheap, and more familiar with the unix flavor), and the G-Productions DirectX DevPack. I was following the Drunken Hyena tutorial (though most of the source code he provides wouldn't compile). I wrote my way through the first app no problem, then started initializing the D3D Device and got a Failed result from the CreateDevice function. Ok, no problem, I know that people rave about how great the error handling in D3D is, so I create a MessageBox that contains DXGetErrorString9(hr). Include DXERR9.h and add -ldxerr9 to my linker. After a bit of messing around with the makefile, I get it to recognize all the files, and it compiles to exe ... then I get a runtime error which tells me that the application can't find dxerr9.dll and has crashed as a result. Ok, no problem, I copy dxerr.dll to c:\windows\system32\ run it again. Still errors out the same. This is the point I run out of things I can think of, so I go to my friend, who explains to me that I need to register the DLL, but regsvr32 dxerr9.dll (executed in the c:\dev-cpp\DLL\ dir) gives me an error: "The module "dxerr9.dll" was loaded but the entry-point DllRegisterServer was not found." My Google-Fu doesn't come up with anything obviously helpful, so I'm coming to this community. I'm running this on Windows Vista x64, and I'm pretty sure that's mucking things up, since this same code (well, minus the Error Checking) was working on my Windows XP laptop. Any suggestions?

Share this post


Link to post
Share on other sites
This clearly don't happens when you use Microsoft's tools, Visual Studio and the official DirectX SDK. I never tried to make DX working on Dev-Cpp, and others might help, but my best guess would be to directly ask on that "G-Productions" forum where as it seems ported Microsoft SDK to work on Dev-Cpp compiler.

Installing the latest DX redistribuable should be enough to have all dlls installed and registered, and I doubt your devpack need the client to install their own redistribuables. Still, I can tell you I don't have any dxerr9.dll file in my system directory. The DX files are called something like d3dx9_31.dll. You could also try copying the file to C:\Windows\SysWOW64 since you use a 64bit system.

Share this post


Link to post
Share on other sites

This topic is 3291 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.

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