Unable to start program because of missing .exe

Nickwel96 101 Nov 28, 2012 at 14:56

EVerytime I try to debug my programs I keep getting: Unable to start program ‘c:\Users\Nick\Documents\Visual Studio 2008\Templates\devmaster_intro-to-c-tmpl83.00c_oct14\Template_debug.exe’. System cant find specified path

Can someone please tell me why this is. This is part 8 in the tutorial I’m doing, and it is the first time I have this problem.

3 Replies

Please log in or register to post a reply.

alphadog 101 Nov 29, 2012 at 14:33

Are you trying to build & run? Try just building the project, then going into to folder and running the exe manually. Is it there? Does it run?

Most commonly, this is because a given solution has multiple projects in it, and is defaulting to the wrong project as the startup project.

Nickwel96 101 Nov 29, 2012 at 16:08

Thanks for the answer,
No, I don’t have multiple projects. And when I try to build it it tells me the code is wrong. But I’m just doing what a tutorial tells me to do, so it should work.
It already happends after trying the first step in: http://devmaster.net/posts/2851/introduction-to-c-with-game-development-part-9-colors.
The error are: arror C2065: ‘m_Surface’ : undeclared identifier
and: error C2227: left of ‘->Clear’ must point to class/struct/union/generic type.
all in line 19 in file game.cpp

TheNut 179 Nov 29, 2012 at 17:20

That error is basically telling you that m_Surface isn’t defined anywhere. It would be like doing this:

int i = 0;  // OK
abc = 1;  // <-- abc = undeclared

Check to make sure m_Surface is defined somewhere, typically in the header file. Make sure your project environment can also find the header file. In Visual Studio, right click on “#include “myfile.h” (or whatever headers you have) and click on “Open Document”. If VS throws an error, then your include paths isn’t setup correctly. You need to right click on your project -> go to configuration properties -> C/C++ and make sure “Additional Include Directories” contains all your paths.