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

Author Topic: Undefined Reference(CodeBlocks)  (Read 1869 times)

0 Members and 1 Guest are viewing this topic.

Keyboom

  • Newbie
  • *
  • Posts: 1
    • View Profile
Undefined Reference(CodeBlocks)
« on: August 21, 2016, 10:16:26 pm »
First, I'm sorry. I'd like to tell you that I do know that there are lots of posts here and at Stack Overflow telling me what to do but nothing solved. So, I followed the tutorial for the 2.4 version of SFML and I'm running the example program but I get the following errors:
Code: [Select]

||=== Build: Debug in openfight (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\Users\keybo\Documents\openfight\main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\keybo\Documents\openfight\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Users\keybo\Documents\openfight\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\keybo\Documents\openfight\main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\Users\keybo\Documents\openfight\main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
C:\Users\keybo\Documents\openfight\main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Users\keybo\Documents\openfight\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Users\keybo\Documents\openfight\main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Users\keybo\Documents\openfight\main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
C:\Users\keybo\Documents\openfight\main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Users\keybo\Documents\openfight\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
C:\Users\keybo\Documents\openfight\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Users\keybo\Documents\openfight\main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\Users\keybo\Documents\openfight\main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Users\keybo\Documents\openfight\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\keybo\Documents\openfight\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\keybo\Documents\openfight\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\Users\keybo\Documents\openfight\SFML-2.4.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Users\keybo\Documents\openfight\SFML-2.4.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Users\keybo\Documents\openfight\SFML-2.4.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||error: ld returned 1 exit status|
||=== Build failed: 21 error(s), 0 warning(s) (0 minute(s), 4 second(s)) ===|

I'm using Code::Blocks 16.01 with the standard minGW(gcc 4.9.2) and SFML 2.4.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Undefined Reference(CodeBlocks)
« Reply #1 on: August 22, 2016, 01:13:54 am »
I do know that there are lots of posts here
Then you probably know that without the full build command and/or without knowing how you configured your IDE we can't tell you anything more than what you've already read in those posts. ;)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Undefined Reference(CodeBlocks)
« Reply #2 on: August 22, 2016, 10:28:37 am »
And from reading all these posts, what did you already try?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/