Solved

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

Posted on 2009-04-08
3
2,177 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nested if statement in excel help 4 27
VB.NET (2008) - Refactoring Question 2 21
vb.net winforms sizing/resolution? 4 34
VB.NET 2008 - SQL Timeout 9 24
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
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 goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

809 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