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

Author Topic: Undefined refference error  (Read 1116 times)

0 Members and 1 Guest are viewing this topic.

marmu123

  • Newbie
  • *
  • Posts: 1
    • View Profile
Undefined refference error
« on: August 14, 2018, 10:22:18 pm »
Hello, I created my first SFML project after looking at many tutorials,linked correctly the libraries ,installed the compatible version of SFML,but i still got 2 error in buildind the basic project from SFML site.I dont have a big amount of knowledge in programming and thats why im asking for your help.(I created an empty project in CodeBlocks)


||=== Build: Debug in sss (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\CodeBlocks\sss\main.cpp|10|undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKSsRKNS_4RectIiEE'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 9 second(s)) ===|

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Undefined refference error
« Reply #1 on: August 14, 2018, 10:42:20 pm »
Read all every word of the Code::Blocks tutorial carefully, don't jump from image to image, but do it step by step and it will work. :)

Looks like you didn't link sfml-graphics properly.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything