Sign in to follow this  
deathknight2005

Annoying Error with Visual C++ Express 2005 and 2008 (Still Unsolved)

Recommended Posts

I'm getting an annoying error whenever I try to debug a program with Visual C++ Express 2005 or 2008 and it is hindering the progress of my RPG with SDL because I can't debug! This is the error: Unable to start program 'File name here' I have tried reinstalling Visual C++ Express and I have tried creating new projects and changing Project Settings but it was all to no avail. I have no idea what I should do about this! Please help! [Edited by - deathknight2005 on January 2, 2008 2:46:05 PM]

Share this post


Link to post
Share on other sites
Your project probably doesn't build. Look in output window. It'll say something like:
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Errors will be listed above that. Until you manage to build the project successfully, there's not much to debug.

Share this post


Link to post
Share on other sites
I'm willing to bet that some of the DLLs needed to run your program (SDL perhaps?) are not on the PATH. You can either copy the DLLs to your solution's directory, or else modify the Environment in your project settings (found under Configuration Properties->Debugging):

PATH=%PATH%;c:\path\to\DLLs

Share this post


Link to post
Share on other sites
It worked!! Thank you so much! I can get back to work on my RPG again!
Thanks!

EDIT: IT just started up again and there are still no build errors and the DLL files are all in the folder. It just started up randomly and I have no idea what to do. I didn't link any other DLL files to it, I was only coding so I don't know what is wrong.

[Edited by - deathknight2005 on January 2, 2008 2:02:53 PM]

Share this post


Link to post
Share on other sites
If you are switching between Debug and Release modes, you need to make sure that the Environment property is modified for both. Also, if that doesn't work, try running your program from a command prompt or from Windows Explorer to see what happens. Also, double check that you have all the necessary DLLs. You can do this by running the Visual Studio Command Prompt and the following command:

dumpbin /imports myprog.exe | find ".dll"

This will print out all of the dependent DLLs. You can then make sure they are all there, minus of course the C/C++ runtime library and other system-wide DLLs (and do not need to be in the same directory, as they are already installed system-wide).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this