Tag Archives: C++

The System Cannot Execute The Specified Program C++

Today I made a simple console application using Visual C++ 2008 and it was runs well on my development machine. But the problem occurred when I run the application on another machine, the error says “The system cannot execute the specified program“. I was guessing the problem occurred because of missing library or something, after short analysis both machine have the correct and the same library. So what’s going on??

I googled for this error and found this article, it explains how this problem occurred on compiled C++ application. There’s two type of build on VC++ ( Debug and Release), my application was built in debug mode and we can’t re-distribute the application on debug mode. The built program in debug mode only runs on development machine, so in order to distribute my app I should build my application in ‘Release’ mode. Time to switch from ‘Debug’ to ‘Release’ mode,

Open your Visual Studio->(Open Project)->Project->(project name) properties

select the Build Tab, in configuration option choose “Release”.

Rebuild your project, you will find “Release” folder, your released application is in there.