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

Author Topic: Help with CB and SFML2  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

hayer

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Help with CB and SFML2
« on: October 04, 2011, 02:43:35 pm »
Soo I downloaded the pre-built bins from this blog;
http://sfmlcoder.wordpress.com/2011/05/18/creating-a-first-sfml-project/

But when I try to compile I just get this error;
Code: [Select]
obj\Debug\main.o||In function `main':|
d:\PEngine\TestProject_SFML\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
d:\PEngine\TestProject_SFML\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKSsmRKNS_15ContextSettingsE'|
d:\PEngine\TestProject_SFML\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
d:\PEngine\TestProject_SFML\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5CloseEv'|
d:\PEngine\TestProject_SFML\main.cpp|10|undefined reference to `_imp___ZN2sf6Window9PollEventERNS_5EventE'|
d:\PEngine\TestProject_SFML\main.cpp|22|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
d:\PEngine\TestProject_SFML\main.cpp|22|undefined reference to `_imp___ZN2sf12RenderTarget5ClearERKNS_5ColorE'|
d:\PEngine\TestProject_SFML\main.cpp|23|undefined reference to `_imp___ZN2sf6Window7DisplayEv'|
d:\PEngine\TestProject_SFML\main.cpp|7|undefined reference to `_imp___ZNK2sf6Window8IsOpenedEv'|
d:\PEngine\TestProject_SFML\main.cpp|26|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
d:\PEngine\TestProject_SFML\main.cpp|26|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
||=== Build finished: 11 errors, 0 warnings ===|


Helpz?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with CB and SFML2
« Reply #1 on: October 04, 2011, 02:54:56 pm »
What are your linker options?
Laurent Gomila - SFML developer

hayer

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Help with CB and SFML2
« Reply #2 on: October 04, 2011, 04:09:45 pm »
Forgot to link in the files in the project settings.

But now I'm getting "The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem."

Re-installing CodeBlocks didnt help..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with CB and SFML2
« Reply #3 on: October 04, 2011, 04:11:46 pm »
This DLL should be in the MinGW/bin directory which is in your Code::Blocks installation. If you can't find it there's still Ctrl+F ;)
Laurent Gomila - SFML developer

hayer

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Help with CB and SFML2
« Reply #4 on: October 04, 2011, 04:18:52 pm »
Can't find it there either.. However there is a 'libgcc_s_sjlj-1.dll'.. What now? Swap IDE, again?  :lol:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with CB and SFML2
« Reply #5 on: October 04, 2011, 04:23:35 pm »
Ok, so basically, the precompiled binaries that you downloaded were compiled with a different version of gcc than yours. And of course they are incompatible ;)

So either you rebuild SFML yourself, or you install a compatible version of gcc. Precompiled binaries use DWARF2 versions, yours is a SJLJ.
Laurent Gomila - SFML developer

hayer

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Help with CB and SFML2
« Reply #6 on: October 04, 2011, 04:25:21 pm »
**** dat shit, im building mah own

 

anything