SDL program can be run by itself, but not through commandline
开发者_如何学JAVAIs this normal, or is there something weird with my program?: i wrote a small, simple program with sdl for some basic graphics. it compiles and runs. when i click on the .exe file, it runs. however, when i drag the .exe into cmd (windows 7 x64), it runs and quickly exits. the window opened through SDL shows for a moment, but is blank. also, stdout.txt and stderr.txt are created, but both are empty
When you drag your program to cmd.exe probably execution directory is changing, so your program is not finding SDL.dll and/or its data files (like images, sounds, etc).
精彩评论