Sign in to follow this  

Compiling for release

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

It seems dumb to me that I'm not sure how to do this, but I'll suck it up and ask for help... The problem is that somehow I don't really understand the specifics between debug and release versions, and their various DLLs. The real question is: How to I create a version of the program that doesn't require the various SDKs to be installed? I was having a lot of trouble getting a program to run on various systems. Some would work properly, and some wouldn't. After sorting through all sorts of cryptic errors, it became apparent was that the proper DLLs weren't installed. If the system had Visual Studio and the DirectX SDK installed, it had the necessary DLLs installed, but otherwise it wouldn't work. So how do you fix this? How do you make a compiled program work on a system that doesn't have the SDK installed?

Share this post


Link to post
Share on other sites
Quote:

The real question is: How to I create a version of the program that doesn't require the various SDKs to be installed?

In general, you don't. There are ways to statically link to the runtimes (in fact it's really easy) and some other libraries, but it is usually recommended that you dynamically link to the DLLs (plus there are certain libraries where dynamic linking is your only choice). It all depends on what version of DirectX and Visual Studio you're using, but you have to:

1) Install the Visual C++ Runtimes. There are different versions of the Visual C++ Runtimes, so if you aren't using Visual Studio 2008, you'll want to click the links on the bottom of that page to take you to the right runtimes (also note that link is for 32-bit machines; a link to the 64-bit versions can also be found on that page).

2) Install the version of DirectX that you require for your program. There are end-user redistributable installers you can bundle with your program, but which one depends on what version of DirectX you're using.

3) Any other libraries that you might require (such as .NET, perhaps).

You can't get around installing these libraries. Your program needs them, and if a computer doesn't have them, you need to create some installer for your program that handles the installation of all your required sub-libraries.

Share this post


Link to post
Share on other sites
To clarify a little bit more...

Let's just sat you have a program that uses Direct3D, DirectSound, and DirectInput, with some external files (a model, texture, and sound). All it does is load up a model with texture and play a sound.

In this example, I can compile as a debug or release version. I can add the appropriate files to those directories, then copy them anywhere else on this particular computer and have it run just fine.

However, I can't make it run on a computer without the DirectX SDK installed. Basically, I want to create this program as a standalone that you could, say, put on a CD and take somewhere else, then have it run fine al long as DirectX is install and all of that (not the SDK).

Share this post


Link to post
Share on other sites
Quote:
Original post by Chek
However, I can't make it run on a computer without the DirectX SDK installed. Basically, I want to create this program as a standalone that you could, say, put on a CD and take somewhere else, then have it run fine al long as DirectX is install and all of that (not the SDK).


Then go ahead and compile as Release, and stick all of the files on a disk. Just be prepared for your app to crash at startup on most PC's (especially if your target the latest DX SDK).

Share this post


Link to post
Share on other sites
Quote:
Original post by MJP
Quote:
Original post by Chek
However, I can't make it run on a computer without the DirectX SDK installed. Basically, I want to create this program as a standalone that you could, say, put on a CD and take somewhere else, then have it run fine al long as DirectX is install and all of that (not the SDK).


Then go ahead and compile as Release, and stick all of the files on a disk. Just be prepared for your app to crash at startup on most PC's (especially if your target the latest DX SDK).


What I'm getting at is... What do you need to have? I don't mind if I need to include extra files with it, but I don't want to have to install the DX SDK on every computer. Just look at, well, every game out there. You don't have to have the SDK installed to run them. How do you get it to do that?

Share this post


Link to post
Share on other sites
Quote:
Original post by Machaira
Quote:
Original post by Chek
How do you get it to do that?

You install the DX runtime if necessary.

Get a install package creator.


That was actually all it needed. Thanks. All I need to do is point people to newer DX runtimes or include it myself.

I just didn't want to install the whole SDK. Thanks.

Share this post


Link to post
Share on other sites

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