How to get programs working on other computers?

I was wondering how I could get my programs running on other computers? Does that depend on the program?
I use Microsoft Visual Studio 2010 Express, if that helps. Thanks in Advance.
Other computers meaning the same Operating System or different?

For C++ if its the same OS, you just execute the exe file else recompile the whole source code if on a different OS.

if you need the location to get the exe, I think its under the debug folder in your project directory for Visual Studio.
Last edited on
Other computers as in same operating system and different.

I have tried putting my executable file on another computer, that has the same operating system, but a message pops up that says I am missing the proper DLL's.

I thought C++ was a cross platform language? I always took that as in once you compile it on one computer and make an executable file. Then that executable file can work on any computer on any operating system.
Not any OS if you have like windows.h or something and you have to compile on different OS because they use .exe .apk and lots of other stuff
You probably gave him a DEBUG compile.
You should always give away (after a test) the RELEASE compile.
Last edited on
You need to know what DLLs your program depends on and provide them to your users if they don't have them.

Use a program like Dependency Walker (http://www.dependencywalker.com/) or pedump (http://www.wheaty.net/downloads.htm) to see what DLLs your program requires to use.

If you can't find the DLLs in \Windows\system32 or \Windows\SysWOW64 then you need to give your users a copy (if legal) or link them to a copy (otherwise).

Put your program's executable in a directory and all the DLLs you plan to distribute with it.

For this example, we'll pretend your real name is Nikolai, and you've written the next killer pong game - ping-pong - using SFML.

Your directory structure might look like this:

    C:\Users\Nikolai\prog\ping-pong\release\ping-pong
        images\
        libsndfile-1.dll
        openal32.dll
        ping-pong.exe
        README.txt
        sfml-audio-2.dll
        sfml-graphics-2.dll
        sfml-system-2.dll
        sfml-window-2.dll
    C:\Users\Nokolai\prog\ping-pong\release\ping-pong\images
        title.png
        numbers.png
        paddles.png
        ball.png

Your next step is to decide how to distribute it. The simplest solution is to simply zip it up.

    cd \Users\Nikolai\prog\ping-pong\release
    zip -r ping-pong.zip ping-pong

Now you can simply give your friends ping-pong.zip and they can unzip it somewhere on their system and play. (Or complain that you missed a DLL, in which case you'll have to add the missing DLL and zip it all again.)

A nicer solution is to use a nice installer like Inno Setup (http://www.jrsoftware.org/) to package your program into a standard EXE that your friends can use to install and uninstall your program.

Hope this helps.
What do you mean by
my programs
We are on a C++ programming forum. What do you think he means by "my programs"? Stuff someone else wrote?
Topic archived. No new replies allowed.