Including The Right DLLs

This is a discussion on Including The Right DLLs within the Game Programming forums, part of the General Programming Boards category; A little while ago I was asking why my game wouldn't work on other people's PCs. I was told this ...

Including The Right DLLs

A little while ago I was asking why my game wouldn't work on other people's PCs. I was told this was because they didn't have the required DLLs that come with MSVC++ Express, but that it was possible to link these with the other files. What DLLs do I need to do this as I have found nothing on the internet and how do I link them?

You have to build in release mode instead of debug mode. Debug mode requires DLLs that come with MSVC++ while release mode doesn't.

Generally speaking, you shouldn't have to join DLLs with your programs unless they are from a library you had to download (i.e. SDL, Ogre...) or if you made your own DLL. Otherwise, you don't have to join DLLs.

Tell them to install Visual C redistributable, that should do the trick. I had to switch a compiler mode:
Project properties -> C++ -> Code generation -> Runtine Library

In debug mode set this to Multi-Threaded debug, instead of DLL and in normal set it to just Multi-Threaded (if you wish to have that setting). Then it worked for me on a computer that did not have VS 2005, but I haven't tried if it works on computers that don't have vc redistributable.

Well when I put it into release mode I got about 13 errors and when I tried just Multi-Threaded as that was the only one that would work other than multi-threaded Debug with DLL. When someone with MSVC++ Exp. they got this error:

Code:

This application has failed to start because d3dx9_30.dll was not found. Re-installing the application may fix this problem.

What were the errors in Release mode ? Debug mode kinds of patches your errors and Release mode doesn't do anything to prevent your errors so it's normal that you get more errors. d3dx9 is obviously Direct3D 9; therefore, I conclude that this person doesn't have Direct X 9 installed and that you used DirectX 9 to code.

If you are trying to get your exe to run on another system you should be using the MSVS Setup and Deployment Projects and following the instructions laid out in the help file under Setup and Deployment.

If you follow those instructions you will have little, if any, trouble installing your app on another system.

If you are attempting to give someone the source so they can compile it they must have: