SFML community forums

Help => General => Topic started by: Bardiusi on April 01, 2020, 10:45:03 pm

Title: cannot find -lsfml-xxxxx-d
Post by: Bardiusi 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...
Title: Re: cannot find -lsfml-xxxxx-d
Post by: eXpl0it3r 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.
Title: Re: cannot find -lsfml-xxxxx-d
Post by: Nartyna 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).