Unable to run SDL program in Eclipse but able to do so in Windows Explorer

五迷三道 提交于 2019-12-11 03:57:10

问题


I have installed and set up SDL and managed to get a tutorial example to build (the tutorial code is from http://zamma.co.uk/setup-sdl2-eclipse-windows/) as a C++ Project in Eclipse.

The problem is that when I try to run the application from Eclipse, the window doesn't appear, or perhaps it gets closed soon after appearing. Eclipse doesn't appear to show any errors.

When I open the folder containing the executable in Windows Explorer and double-click on the application, it works; a window appears with "Hello World" as the title and closes after two seconds.

How can I get the window to appear when I run from Eclipse? Any breakpoints I set are ignored by the debugger.

IDE: Eclipse Luna 4.4.1
OS: Windows 7 64-bit


回答1:


The program now runs in Eclipse, so the solution may have been to refresh Eclipse and double check Build settings and Run configurations, as well as checking for any OS modifications that may affect the software running on it (thanks to all who replied for the help).



来源:https://stackoverflow.com/questions/28480916/unable-to-run-sdl-program-in-eclipse-but-able-to-do-so-in-windows-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!