SFML community forums
Help => General => Topic started by: pabloist on July 17, 2010, 09:05:38 am
-
So I'm following the Code::Blocks installation of SFML.
The program compiles, but then when I run it, it tells me that sfml-system-d.dll is missing from my computer. However, I can see it right there in my SFML\lib folder. Any ideas on what's going on?
I've tried both sticking the lib and header files in the Code::Blocks program file directory and using the Settings - Compiler and Debugger - Search directories - Compiler/Linker to give the location of the files.
-
The DLLs must be in the same directory as your executable.
-
So ...
Leave the SFML files where you want, and setup Code::Blocks so that it can find them
* Go to the Settings / Compiler and debugger menu, then to Global compiler settings / Search directories
* In Compiler, add SFML-x.y\include
* In Linker, add SFML-x.y\lib\mingw
doing this doesn't work?[/quote]
-
Doing this works while you are building a program. For the executable to be able to run you have to place all dependency .dlls in the same folder as the .exe file, as Laurent wrote.
-
Okay, I copied all the .dlls from the lib folder. Now, it's telling me that it can't start because libgcc_s_dw2-1.dll is missing...what?
-
I think this might help:
http://www.sfml-dev.org/forum/viewtopic.php?t=2812&highlight=libgccsdw21+dll
-
Ok, thanks. I did the same thing that guy did - downloaded the libgcc_s_dw2-1.dll.
So, every time I write an SFML program, I need to place the relevant .dlls in the bin folder? (The one containing the .exe)
-
Or you could put them in any folder that your OS looks in for libraries.
On windows, this is typically your "System32" folder. iirc, "C:\Windows\System32" or "C:\WINNT\System32". If you put the DLL files there they'll work for any programs you make/download in the future.
-
Okay, I'll try that. Thank you!
-
Or use the static-libgcc linker option.