SDL - Can't run program outside of IDE

Sep 4, 2013 at 1:08am
Hey guys, I've been working on a small SDL program and decided I wanted to throw the program on to a disc so I could show some people what I'm working on. However, when I try to run the executable, the program crashes and under more details it says that the fault lies on SDL2_ttf.dll .

Why does this program work inside of VS2012e and not in windows?

What I did :

Set the program to release, hit f6, and then tried to run the executable from windows.

Additional information :

Compiler : Visual Studio 2012 express
O/S : Windows 7 64bit
SDL lib : 32 bit version
Last edited on Sep 5, 2013 at 4:41am
Sep 4, 2013 at 1:13am
You used SDL, and so had to link the appropriate libraries (that you downloaded) to compile the exectuable. It's the same here; the program can't run without those libraries, so you need to include them with the program.

Dependency Walker is a useful tool that'll show you these requirements so you know what you need to include with your program when redistributing it.
Sep 4, 2013 at 1:18am
You mean put the DLL files into the folder with the executable? I've already done that.
Sep 4, 2013 at 1:18am
Are the dlls in the same directory as the executable?
Sep 4, 2013 at 1:31am
The folder with the executable are :

libfreetype-6.dll
Project1.exe
Project1.pdb
SDL2.dll
SDL2_ttf.dll
zlib1.dll

IIRC those are the only included DLL's in the IDE
Sep 4, 2013 at 5:49am
Let's begin the troubleshooting process:

On how many machines have you tried to execute your program?
Sep 4, 2013 at 7:47am
Just a wild guess, are you using a relative path?
Sep 5, 2013 at 4:40am
I've tried running it on another computer, but I found out it didn't have .net installed.

I don't understand what you mean by using a relative path?
Sep 6, 2013 at 4:16am
What is the error message that appears or will it just crash?
Topic archived. No new replies allowed.