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

Author Topic: Problems with the SFML2 setup.  (Read 1148 times)

0 Members and 1 Guest are viewing this topic.

Coyote

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problems with the SFML2 setup.
« on: June 20, 2013, 01:19:12 am »
I believe I have followed the SFML 2 step by step tutorial correctly. But, when i try the  example code, it comes up with those errors:

Code: [Select]
||=== TESTS, Debug ===|
obj\Debug\main.o||In function `main':|
C:\Dev\projects\TESTS\main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Dev\projects\TESTS\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Dev\projects\TESTS\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Dev\projects\TESTS\main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\Dev\projects\TESTS\main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
C:\Dev\projects\TESTS\main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Dev\projects\TESTS\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Dev\projects\TESTS\main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Dev\projects\TESTS\main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
C:\Dev\projects\TESTS\main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Dev\projects\TESTS\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
C:\Dev\projects\TESTS\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Dev\projects\TESTS\main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\Dev\projects\TESTS\main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Dev\projects\TESTS\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Dev\projects\TESTS\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Dev\projects\TESTS\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\Dev\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Dev\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Dev\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||=== Build finished: 20 errors, 0 warnings (0 minutes, 0 seconds) ===|

Any suggestions? I'm using windows 8 and Code Blocks.

p.s: Sorry about the bad english.

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Problems with the SFML2 setup.
« Reply #1 on: June 20, 2013, 02:08:47 am »
Grab the MinGW TDM 32 or 64bit (whichever you need) SFML build from this site http://sfml.my-gate.net/nightly/

If you have everything else set up correctly this will fix it.  I had the same issue and the official release doesn't work with Code::blocks' MinGW compiler. and you need to download a newer build that will work.  OR you can compile SFML from the sources to meet your own compilers needs.

There are also a number of threads on this forum, just search for Code Blocks sfml 2 and you will see many similar threads.
« Last Edit: June 20, 2013, 02:17:52 am by The Hatchet »

Coyote

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problems with the SFML2 setup.
« Reply #2 on: June 20, 2013, 02:57:12 am »
Had already tried that, and sadly it didn't  work. :'(
My setup:




I just don't know what to do. I will try compile from the sources now, but if anyone have another idea, please tell me.

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Problems with the SFML2 setup.
« Reply #3 on: June 20, 2013, 03:15:46 am »
Your settings look good.  If you already tried the Nightly Build then I'm not sure.  Maybe its a windows 8 thing?  But I know i've seen the exact errors before and it's always not linked right, or needed the nightly build.

 

anything