EXE compiled on Vista won't run on XP (Visual Studio 2005/Native C++) [SOLVED]

Started by
6 comments, last by summaky 15 years, 9 months ago
Hi! My home PC runs Vista (32 bit business) and so does my notebook (32 bit home premium). When I compile a C++ Project with Visual Studio 2005 SP 1 on Vista, the EXE it produces will run fine on Vista, but it won't start up on XP (Brings up a Dialog with a message along the lines of "The app is not correctly configured"). When re-compiling the same APP (unmodified source code) on XP, it will run just fine on XP. I've had this problem with two separate applications, one being a really simple console app that didn't do anything fancy (and most likely nothing Vista specific). So I was wondering what could be causing that? Btw.: I'm talking debug-builds but I had the same phenomenon with release builds. Thanks a bunch! [Edited by - Harry Hunt on June 25, 2008 11:10:10 AM]
Advertisement
Generally speaking, debug builds will only run on machines with Visual Studio installed.

As for the release runtimes, you need to install the VC2005 Redistributable Package on machines you want to run your app on. Vista probably has this as default, but you can't really rely on that.
Wow, that was quick!
The XP machine has Visual Studio 2005 installed as well... maybe debug builds don't work across OSes though (which would be understandable). Thanks for the reply though.
Quote:Original post by Harry Hunt
Wow, that was quick!
The XP machine has Visual Studio 2005 installed as well... maybe debug builds don't work across OSes though (which would be understandable). Thanks for the reply though.
Is it the exact same version of Visual Studio on all machines? If not, that's likely to be the problem with debug builds.
Come to think of it, the one on Vista is SP 1 and the other one probably doesn't have the service pack. Gotta verify that, but thanks! Good tip!
Figured it out (with your help):
The machine had Visual Studio 2005 installed, but not the SP 1 version and hence no SP 1 runtime. Installed that and it works like a charm. Thanks again!
Quote:Original post by Evil Steve
Generally speaking, debug builds will only run on machines with Visual Studio installed.


Are you sure? Why VS should be present for debug executables? I mean debug executable = release executable - optimizations [ + usually debug info].
Quote:Original post by bubu LV
Quote:Original post by Evil Steve
Generally speaking, debug builds will only run on machines with Visual Studio installed.


Are you sure? Why VS should be present for debug executables? I mean debug executable = release executable - optimizations [ + usually debug info].


Yes, but debug executables are linked to the debug version of the runtime libraries, which can't be (legally) distributed in a separate package like the release runtime libraries are. They can't only be installed with Visual Studio.

This topic is closed to new replies.

Advertisement