Direct3D Debug Mode - How to release project?

Started by
6 comments, last by discman1028 18 years ago
When I build my D3D app and send to a friend, he gets the error: "d3dx9d_28.dll does not exist". He does have the DX9 runtime installed. Now, I turned off Debug runtime from the control panel. But do I need to turn off something else within Visual Studio (C++ .NET 2003) to produce an executable that doesn't require this debug dll? Thanks
--== discman1028 ==--
Advertisement
You will need to compile in Release, but I think you will still need the release version of the DLL. I'm not that familiar with the history of this DLL, but if I remember correctly about a year ago microsoft took it out of the DX runtime, and you are supposed to add the redistrubuter to you game's installer (or something). You are not supposed to, but for the sake of send something to you buddy, I would just copy the DLL into the same folder as your exe, and send it to him like that.

But you're not supposed to redistubute that DLL...

Matt
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
You need to change the current build configuration of your project from Debug to Release mode. This will make the compiler build the executable with the release DX libraries. In 2005 the option is under Build > Configuration Manager. Since its almost the same in MSVC6, I'd assume its almost the same in 2003 as well.

Just switch to release mode, rebuild, and see if that changes anything. The other option is to directly modify the build options - if you change _DEBUG to NDEBUG in the preprocessor definitions it should work too. But use the configuration manager - it makes life easier by making all those changes for you.

Also do note there are a couple of a lot of other differences between Debug and Release mode - most of them having to do with optimizations (at the cost of safety).
After you change to release, your application will depend on d3dx9_28.dll. You can't distribute this with your application directly (illegal), so you'll have to use DXSetup to distribute it. See Distributing DirectX applications.

Actually, I had it in Release mode. Looking at my compiler options, it also had NDEBUG set...

/O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /EHsc /ML /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /Wp64 /Zi /TP

hmmmmm... still no go.

Anyhow, I found d3dx9d_28.dll in the SDK folder, I'll try "telling my friend to download the SDK" for now.
--== discman1028 ==--
Then it is clearly obvious that you are linking a debug library in your Release profile. You need to adjust your Release profile so that it links to d3dx9_28.dll .
.
Quote:Original post by Mastaba
Then it is clearly obvious that you are linking a debug library in your Release profile. You need to adjust your Release profile so that it links to d3dx9_28.dll .

This entails linking to d3dx9.lib instead of d3dx9d.lib. Just change that, and you should be good.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Oops, thank you. I really am braindead this week.
--== discman1028 ==--

This topic is closed to new replies.

Advertisement