• Advertisement
Sign in to follow this  

.exe in debug and relase folders not working

This topic is 3031 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have many DirectX projects I have worked in and completed in the past couple months and they work fine with i run them within Visual Studio, but I just noticed none of them work when you try to run the .exe file in either the debug or release folder. When you run the file the like outline of the window will appear for a flash then go away. Any one know what might cause, seems like a system problem or something and not a source code problem, since it does it will like 10 different projects. I am working with DirectX 9, VS Pro 2008, and Windows 7. thanks

Share this post


Link to post
Share on other sites
Advertisement
When you run a project from within Visual Studio, the working directory is, by default, the project directory. My guess is your program is trying to load a file using a relative path and getting tripped up because the files don't exist in the Debug (or Release) folder.

This is also a reminder that you should be doing proper error-checking in your programs. Don't just assume that files will be there: if a file doesn't exist, display an error message so you know what's going on.

Share this post


Link to post
Share on other sites
Thanks man, that did the trick!

Also good call on error checking, I have a problem of forgetting that. thanks again

Share this post


Link to post
Share on other sites
I hav ejust the same problem :( But all my files are loaded, and my engine starts.
But all the buttons and controls in the windows looks... old. Likne win98 :D Why???

Share this post


Link to post
Share on other sites
Quote:
Original post by WuTz
I hav ejust the same problem :( But all my files are loaded, and my engine starts.
But all the buttons and controls in the windows looks... old. Likne win98 :D Why???
And it looks fine when you run the app from within Visual Studio? How about if you move the EXE to the solution directory first? It sounds like the same problem, some resource not being loaded because it's in the wrong path.

Share this post


Link to post
Share on other sites
Its a bit strange:

When I run it from within the Debug folder, Everything is ok with the buttons. It just can't find some meshes, but this is ok. All buttons have the nice Win7 style.

When I move the .exe to my project root path (Where VisualStudio sets it path to) It can fnid all meshes, It can do erverything, exept of saving/loading a mapfile. But this is not the problem and I can fix this.

The Problem is, that the buttons have te win98 style, as I sad above.

When I found out, that it works nice in the Debug folder, I tried to copy everything of the folder into the root of my project. But nothing changed :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement