Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: cannot find -lsfml-xxxxx-d  (Read 392 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 1
    • View Profile
cannot find -lsfml-xxxxx-d
« on: April 01, 2020, 10:45:03 pm »
Hello!(really sorry for my bad english) my problem is that I cant even run the tutorial installation code for sfml. I try to installing c::b from zero but nothing. I followed every step from https://www.sfml-dev.org/tutorials/2.5/start-cb.php but nope...

||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics-d|
ld.exe||cannot find -lsfml-window-d|
ld.exe||cannot find -lsfml-system-d|
||error: ld returned 1 exit status|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I have the codeblocks-20.03mingw-setup.exe (32-bit) version.
and GCC 5.1.0 TDM (SJLJ) - Code::Blocks - 32-bit of sfml.

Thanks for the patience...


  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: cannot find -lsfml-xxxxx-d
« Reply #1 on: April 02, 2020, 11:27:54 am »
The package provided by SFML is not compatible with the latest Code::Blocks (20.03) version as of right now.
As such you'll have to rebuild SFML yourself.

The error you get may either be because you didn't specify where to find the library files OR it might have the location, but because Code::Blocks 20.03 now ships with a 64-bits compiler, it doesn't find the provided 32-bits library files.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/


  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: cannot find -lsfml-xxxxx-d
« Reply #2 on: June 30, 2020, 01:27:32 pm »
Hey, (sorry for my bad english). I had the same problem and i solved it. Solution is very simple. Just link SFML dynamic. Copy .dll file form sfml>bin folder (all files) to the project folder. In codeblocks in relese linked normaly (sfml-graphic, sfml-window...) but in debug linked with -d (sfml-graphic-d, sfml-window-d...), and don't define "SFML_STATIC". It works for me.

PS. I have codeblocks with MinGW instaled but i download SFML - GCC 7.3.0 MinGW (SEH) - 64-bit because it's 64-bit, unlike the SFML version for codeblocks (32-bit).