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

Author Topic: help i cant find any way to fix this error: cannot find -lsfml  (Read 1446 times)

0 Members and 1 Guest are viewing this topic.

fersala

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
i am using Code::blocks 20.03 and im using sfml GCC 5.1.0 TDM (SJLJ) - Code::Blocks - 32-bit and now that i think about it my system is 64 bit i dont know if this could be the problem because my teacher also has a 64bit computer
=== Build: Debug in sfml-project01 (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics|
ld.exe||cannot find -lsfml-window|
ld.exe||cannot find -lsfml-system|
||error: ld returned 1 exit status|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: help i cant find any way to fix this error: cannot find -lsfml
« Reply #1 on: March 29, 2023, 02:54:52 am »
Hi, you need to "link" SMFL to your project. There are three things to do


1- In CodeBlocks go to Project/Build options/Search directories/Compiler and add the path to sfml include
folder

2- Go to Project/Build options/Search directories/Linker and add the path to sfml lib
folder

3- Go to Project/Build options/Linker settings, on the left "Link libraries" add the list of sfml libs.
The order is important, look at the picture attached

 

anything