SFML community forums
Help => General => Topic started by: sgthale on December 07, 2010, 09:30:16 am
-
So i followed the tutorial from the Tutorial - Getting started - SFML and Code::Blocks (MinGW) and I keep getting this "Error starting the application since the sfml-system.dll wasnt found. Reinstalling the application can solve the problem" when i try to compile it. I dont think im installing it correctly.
:( :( :( I reinstalled 4 times and keep getting the same error[/b]
I dl latest Codeblocks, full SFML SDK and then
I followed:
Copy the SFML development files to your Code::Blocks installation directory
* Copy SFML-x.y\include\SFML to the \include directory of your Code::Blocks installation (so that you obtain include\SFML)
* Copy the *.a files in SFML-x.y\lib to the \lib directory of your Code::Blocks installation
HELP
-
The DLL must be accessible when your program starts, so you must copy it in the same directory as your executable.
You can also link to static libraries ("-s" suffix) to get rid of DLLs.
-
ehhh i still dont understand. I want it so that i can just go New->Project->SFML project and go from there
-
When your compiled executable starts, it says to the OS "ok, I depend on sfml-system.dll (because the SFML functions that I call are in it), and I need it in order to start; where is it?". Then the OS tries to find sfml-system.dll, first in its "standard" paths: C:\Windows\system32, C:\Program Files, ... not found. Then it tries to find it in the same directory as the executable that requests it... not found. No more place to search, error.
--> Just copy sfml-system.dll at the same place where your executable is created and it will be happy. That's it ;)
And if you link to sfml-system-s instead of sfml-system, you won't even need all this DLL stuff because the SFML functions that you use will be directly copied into your own executable.
-
okay i got it working :D . But is there a way so i can just go New>Project>SFML Project ? Or am i going to have to place every dll i want manually into the same place with the executable :cry:
-
But is there a way so i can just go New>Project>SFML Project ?
If you're referring to the Code::Blocks template for SFML, no. It will setup your project but it can't copy SFML DLLs, that's not its job.
Or am i going to have to place every dll i want manually into the same place with the executable
You can add the directory that contains your DLLs to the PATH environment variable (Google for it if you don't know what I'm talking about). Then Windows will always find them automatically wherever the executable is.
Or you can use static linking...
-
I typed in the error into google for this exact same problem and this was the #1 hit.
I was so happy!!!!!!!!
-
I had the same error. I copied the sfml-system file into the folder my EXE file is in.
I am using code::blocks, Windows 7.
The file I found was "sfml-system.cbp" and it calls it a code:blocks project.
Did I do something wrong?
-
You must copy sfml-system.dll.
-
Where do I find that file?
Thank you very much,
Hunter
-
Is the SFML SDK so huge that you can't look in top-level directories, or use the OS search function? :P
-
I have tried that.
The search does not seem to find it....
I downloaded SFML from the top left link. Could it have not downloaded?
Sorry if my questions sound dumb.. :-/
-
Did you include the full file name of each file you are linking?
The text below is from another topic.
Not sure if this is the issue though.
If you don't use the full file name of the file you are linking it will give you that error.
Remember to drop the [] since they aren't part of the name.
Change out the -s and -d depending on if you want Static Debug, Dynamic Debug, Static Release, Dynamic Release.
libsfml-graphics[-s][-d].a
libsfml-window[-s][-d].a
libsfml-audio[-s][-d].a
libsfml-network[-s][-d].a
libsfml-system[-s][-d].a
I would include a video link but I'm at school at the moment.
Look for SFML Coder on YouTube and look for his Code::Blocks tutorial. This should help you get setup with SFML. :)
-
I downloaded SFML from the top left link
??
What's the name of the file that you downloaded?
-
File name:
Windows - MinGW (Code::Blocks) (34.4 MB)
-
The DLLs are in /lib.
-
note: I use codeblocks 17.12 (last one) with the right GCC 5.1.0 TDM compiler and sfml libs
I still game the same ".dll not found" at runtime after using "-s" variant in the linker settings and defining SFML static.