Solved

The system cannot execute the specified program. C++ VS2008 console.

Posted on 2009-04-08
3
2,165 Views
Last Modified: 2013-12-14
Hi,

I'm having problems running a C++ console application that was compiled on another machine using Visual Studio 2008. It runs on the machine it was compiled on, but when I try to run it on my PC, I get the following message...

The system cannot execute the specified program.

I decided to see if I can isolate the problem by creating a simple "hello world" c++ console, but I still get the same message with the "hello world" program.

Leaving me to believe that their is something special about compiling c++ console apps on Visual Studio 2008 and then deploying them to other machines.

Has anyone seen this before or has got a workaround or fix?
#include <iostream>

#include <conio.h>
 

using namespace std;
 

int main()

{
 

	cout << "Hello world";

	getch();
 

}

Open in new window

0
Comment
Question by:silentthread2k
3 Comments
 
LVL 12

Expert Comment

by:Gideon7
ID: 24103805
The required C runtime DLLs are not installed on the computer.  Run vcredist_x86.exe to install the redistributable DLLs (MSVCR80.DLL, MSVCP80.DLL, etc)
The path will be something like "C:\Program Files\Microsoft SDKs\WIndows\V6.0A\Bootstrapper\Packages\vcredist_x86\vcredist_x86.exe".  To install the DLLs copy vcredist_x86.exe to the target computer and run it there.
0
 
LVL 19

Accepted Solution

by:
alb66 earned 500 total points
ID: 24104887
You can download the "Microsoft Visual C++ 2008 Redistributable Package" from:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24105369
>>>> Run vcredist_x86.exe to install the redistributable DLLs (MSVCR80.DLL, MSVCP80.DLL, etc)

VS2008 has MSVCR90.DLL and MSVCP90.DL.

VC80  is VS2005.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now