0

How can I compile my program to run on a computer without having install Visual Studio 8 in the first place? When I start my program on another computer I get a side-by-side configuration message glitch and the program is terminated without executing my code. Could It be that I forgot to disable the debug symbol table? I've used the startsxs in the console to find out the redistributable involved but to no avail.

Gigamegs
  • 12,342
  • 7
  • 31
  • 71
  • Install the VS8 redistributables on the target computer: x86: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 x64: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15336 – Mysticial Jan 07 '12 at 23:10
  • Though generally not recommended you could statically link the VC runtime (compiler switch /MT) into your program. – hmjd Jan 07 '12 at 23:13
  • @Mysticial: I'm a noob and I've read the page, do you know what is side-by-side deployement or model? My program is very simple. – Gigamegs Jan 07 '12 at 23:15
  • @hmjd: When I use startsxs to find the glitch is says something about debug symbol... When I disable symbol table does it solve my side-by-side glitch? – Gigamegs Jan 07 '12 at 23:16
  • The side-by-side error just means that you don't have the VS8 run-time libraries installed on the target system. (since you don't have Visual Studio installed) It is needed even for the `Release` (non-debug) builds. So in order to run the program you need install those libraries via the redistributable packages. Alternatively you can statically link them to break this dependency, but as hmjd mentions, it's not recommended. – Mysticial Jan 07 '12 at 23:18
  • I don't think so, the VC 2008 runtime will still need to be on the computer, and by default I think that is not the case. Did you try [/MT](http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=VS.90%29.aspx): this will work. – hmjd Jan 07 '12 at 23:21
  • @hmjd: Where can I add the option /MT? I'm new to visual studio and want to disable debug symbols, too. – Gigamegs Jan 07 '12 at 23:25
  • No idea, I don't use the IDE (I build from command-line). I know this is 2005 but it may provide a clue: http://stackoverflow.com/questions/37398/how-do-i-make-a-fully-statically-linked-exe-with-visual-studio-express-2005. – hmjd Jan 07 '12 at 23:29

1 Answers1

0

You are probaly running the program compiled with the "debug" configuration. The standard "debug" configuration requires the debug version of the runtime library, only available with VS. You should switch to the "Release" configuration (or manually remove the definition of the macro _DEBUG and change the runtime library to "Multitrheaded DLL").

Another problem may be that you need a recent runtime from Microsoft on your target machine. You can download it from the Microsft download center.

Lightness Races in Orbit
  • 358,771
  • 68
  • 593
  • 989
Giuseppe Guerrini
  • 3,824
  • 15
  • 28