Solved

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

Posted on 2009-04-08
3
2,196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

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

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

617 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