calccrypto
calccrypto

Reputation: 8991

SDL program can be run by itself, but not through commandline

Is 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

Upvotes: 1

Views: 264

Answers (1)

bcsanches
bcsanches

Reputation: 2372

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).

Upvotes: 2

Related Questions