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

Author Topic: Error while trying to setup SFMLin Code::Blocks  (Read 2376 times)

0 Members and 1 Guest are viewing this topic.

eternityq

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Error while trying to setup SFMLin Code::Blocks
« on: May 01, 2014, 10:02:53 pm »
Hi there! I'm trying to setup SFML in code blocks using the tutorial file, but I'm getting an error all the time as I launch the project. The console opens and then I get the following error:
"Entry point not found
The procedure entry point __gxx_personality_v0 could not be located in dynamic link library C:\path\sfml-graphics-d-2.dll"
What's wrong? The dll is in the C:\path-to-project\debug folder and I've done everything that was said in the tutorial :((

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10882
    • View Profile
    • development blog
    • Email
Re: Error while trying to setup SFMLin Code::Blocks
« Reply #1 on: May 02, 2014, 12:37:28 am »
It means you have the wrong version of SFML in regards to your compiler.
SFML has to be built with the same compiler as you use to compile your application. At best you rebuild SFML from source.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blackarrowz

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Error while trying to setup SFMLin Code::Blocks
« Reply #2 on: May 02, 2014, 11:26:37 am »
I just had this very problem and as a noob it took me a bit of searching to find out what was going on.

First and foremost thanks to Lethn who's post on here actually answered the question in a straight-forward way.

Here is a quote direct from his post his simple post solved my problem after I'd spent an hour trying to figure out what was going on and coming to the conclusion I'd have to recompile for my system.

Here's the solution quoted by Lethn:

Okay, It took me awhile to figure it out but as the tutorial says Codeblocks seems to use the SJLJ version of SFML but I'll have a minor rant about that after showing people what to do and see if this helps fix this problem.

1) Download the GCC 4.7 TDM (SJLJ) version of SFML 2.0 ( NOT GCC 4.7 MinGW (DW2) - 32 bits ) and follow the tutorial as normal

2) Be sure to copy the .dll files to the saved codeblocks project folder that you have

Note: I did this without having to use CMake at all and in the end Codeblocks seems to work fine with the SJLJ version of SFML 2.0, I was getting .dll errors and entry procedure errors until I tried this.

I followed these steps myself having had an annoying number of problems getting it to work after following the tutorial normally, to an absolute beginner the SJLJ/DW2 business isn't very clearly explained. I looked in MINGW's Bin folder and found libgcc_s_sjlj-1.dll and libgcc_s_dw2-1.dll files and just through randomness I tried downloading the SJLJ version instead and followed the steps again. It worked and so far there hasn't been any crashes or error messages.


Such a simple solution why is this not given more prominence in the installation walk through, trying to weed out the noobs ;)

Thanks Lethn, everything works just fine now.

Z


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Error while trying to setup SFMLin Code::Blocks
« Reply #3 on: May 02, 2014, 11:39:03 am »
Since the "solution" is to use the correct version of SFML, and since it is explicitly mentioned in the tutorial, I don't know what else could be said. Any suggestion?

By the way, Lethn did not do anything special, we could sum up what he says by "I carefully read what is explained in the tutorial and it worked" ;)
Laurent Gomila - SFML developer

eternityq

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Error while trying to setup SFMLin Code::Blocks
« Reply #4 on: May 02, 2014, 05:52:49 pm »
Well, that was really noobish of me, so sorry for the question.
And thanks a lot for your answers! It helped me!
So now I'm happy.
Really appreciate your answers!