SFML community forums

Help => General => Topic started by: sgthale on December 07, 2010, 09:30:16 am

Title: sfml-system.dll was not found
Post 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
Title: sfml-system.dll was not found
Post by: Laurent on December 07, 2010, 09:41:12 am
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.
Title: sfml-system.dll was not found
Post by: sgthale on December 07, 2010, 09:53:01 am
ehhh i still dont understand. I want it so that i can just go New->Project->SFML project and go from there
Title: sfml-system.dll was not found
Post by: Laurent on December 07, 2010, 10:11:57 am
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.
Title: sfml-system.dll was not found
Post by: sgthale on December 07, 2010, 05:13:30 pm
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:
Title: sfml-system.dll was not found
Post by: Laurent on December 07, 2010, 06:15:39 pm
Quote
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.

Quote
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...
Title: Wow
Post by: matthew.coduti on February 03, 2012, 04:19:13 am
I typed in the error into google for this exact same problem and this was the #1 hit.

I was so happy!!!!!!!!
Title: ?
Post by: PinkYakRC on February 10, 2012, 06:39:07 am
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?
Title: sfml-system.dll was not found
Post by: Laurent on February 10, 2012, 08:06:21 am
You must copy sfml-system.dll.
Title: sfml-system.dll was not found
Post by: PinkYakRC on February 10, 2012, 02:29:09 pm
Where do I find that file?

Thank you very much,

Hunter
Title: sfml-system.dll was not found
Post by: Laurent on February 10, 2012, 03:40:32 pm
Is the SFML SDK so huge that you can't look in top-level directories, or use the OS search function? :P
Title: sfml-system.dll was not found
Post by: PinkYakRC on February 10, 2012, 03:44:50 pm
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.. :-/
Title: sfml-system.dll was not found
Post by: StormWingDelta on February 10, 2012, 04:28:45 pm
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. :)
Title: sfml-system.dll was not found
Post by: Laurent on February 10, 2012, 04:43:13 pm
Quote
I downloaded SFML from the top left link

??
What's the name of the file that you downloaded?
Title: sfml-system.dll was not found
Post by: PinkYakRC on February 11, 2012, 05:02:18 am
File name:
Windows - MinGW (Code::Blocks) (34.4 MB)
Title: sfml-system.dll was not found
Post by: Laurent on February 11, 2012, 09:33:43 am
The DLLs are in /lib.
Title: Re: sfml-system.dll was not found
Post by: blacksages on February 15, 2019, 12:06:22 pm
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.