Reputation: 2053
I created a game with SDL and C++ in Visual Studio. This game was made for my university (computer science).
When I run it from Visual Studio everything runs perfectly. When I go to the folder of the project and run it through the .exe file it pops up and then it closes immediately. My properties in the system are already in Windows application, multithreaded dll.
I don't get it — it should work fine since I can run it through the solution explorer without any warnings/errors. Any suggestions?
Upvotes: 1
Views: 1290
Reputation: 77304
When you start your exe from the Explorer, the current directory changes. Your program most likely cannot find dependencies, either dlls or resources like graphics and sound. A short term solution would be to make sure your files are in the right place. Long-term, you should have better error handling in your program, so you get an error message you can work with.
Upvotes: 1