André Sousa
André Sousa

Reputation: 217

Setting up SFML in Codeblocks cant find "-lsfml-graphics"

I tried installing sfml on windows in codeblocks using c++ by following the tutorial in their website and also by following tutorials on the web but even after all that it doesnt work and it gives out this error:

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

In my compiler settings i have in the #define tab writen "SFML_STATIC"

In the linker setting i have the following link libraries

In the search directories in the compiler sub tab i have the path to my sfml/include folder and in the linker subfolder I have the path to my sfml/lib

Did i do something wrong or did i forget something?

Upvotes: 0

Views: 3771

Answers (1)

Prabhat Maurya
Prabhat Maurya

Reputation: 131

First check do you have a static or dynamic version of your library. In your library path check the files in /lib folder. if they have extension .so for example libsfml-graphics.so .

Go with this tutorial -> https://www.sfml-dev.org/tutorials/2.5/start-cb.php

Upvotes: 1

Related Questions