Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL.dll is missing from my computer - VS 2010

I'm trying to compile a SDL-program I've written, but when I do, this error shows up:

The program can't start because SDL.dll is missing from your computer. Try reinstalling the program to fix this problem

I have no idea as to why. I have SDL.dll.

  • I have put it in the correct folder: C:\Windows\System32.

  • I have the correct PATHS to all the SDL headers and such as well.

VS says:

Build succeeded: 1

and THEN the error above pops up on screen.

like image 829
Nilzone- Avatar asked Sep 29 '12 11:09

Nilzone-


3 Answers

Add it into your debug folder or whatever directory your program is currently located at.

like image 196
Rapptz Avatar answered Nov 03 '22 21:11

Rapptz


SDL.dll has to either be in the same directory as your application, or in a directory that's in the PATH environment variable.

like image 39
Luchian Grigore Avatar answered Nov 03 '22 21:11

Luchian Grigore


IfSDL.dll is 32-bit and you're running a 64-bit system you have to place the dll into /Windows/SysWOW64/ rather than /Windows/System32/, which is used for 64-bit dlls.

EDIT:
You probably shouldn't be deploying your DLLs by copying them into the System32 directory, unless they're common libraries that are used by several applications, and even then I would use discretion. For example, an application could update the DLL, which could break other applications that rely on an older version of the library.

Instead, copy the DLLs into the same directory that the executable is being built in. If you're building and executing with Visual Studio it will look for the DLL in the Project directory, where your source files are probably located.

like image 36
Elliot Hatch Avatar answered Nov 03 '22 23:11

Elliot Hatch