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

Author Topic: Setting up Code::Blocks with DW2  (Read 2299 times)

0 Members and 2 Guests are viewing this topic.

ramailley

  • Newbie
  • *
  • Posts: 2
    • View Profile
Setting up Code::Blocks with DW2
« on: September 28, 2013, 04:33:53 pm »
Hi.

I spent last night trying to get SFML working in Code::Blocks, but I kept running into an error when I ran the program (it compiles fine):

Quote
The procedure entry point __gx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll.

I found out this is caused by conflicting exception handling models (I think). So I plunged myself into messages boards saturated with the acronyms DW2, SJLJ, and EH... none of which I had heard of before.

My Code::Blocks installation was done using the setup that includes MinGW. Okay, so I figured I would download the SFML libraries from the option that had "(MinGW)" beside it. Logical, or so I thought. But from what I can tell (after hours of searching), is that my compiler is using SJLJ, but this version of SFML was compiled using DW2, and so the two are incompatible. To test this, I downloaded and used the SJLJ version of SFML and everything compiled and ran fine. Cool. But what about this DW2 stuff? The compiler apparently supports both, but I can't find any way to choose between them and I'm not sure why the SFML site lists the DW2 one as MinGW, but this compiler uses SJLJ.

tl;dr: How do I select which model of exception handling my compiler uses?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
AW: Setting up Code::Blocks with DW2
« Reply #1 on: September 28, 2013, 04:56:19 pm »
A compiler uses either one or the other, you can't switch. The one that gets shipped with CodeBlocks is the TDM build with SJLJ, thus you need the corresponding SFML package.
If you were to download MinGW from the official website, you'll get a DW2 version, thus you need the DW2 package.

With other MinGW versions you have to recompile SFML on your own or use a matching package of my Nightly Builds.

Also keep in mind that your compiler has to x64 if you want to use the x64 packages.

And even though the TDM version for some strange reason ships with runtime libs for DW2, the compiler doesn't support DW2.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ramailley

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AW: Setting up Code::Blocks with DW2
« Reply #2 on: September 28, 2013, 05:25:05 pm »
Thanks for the response.

And even though the TDM version for some strange reason ships with runtime libs for DW2, the compiler doesn't support DW2.

I really think this is what threw me off! So if I want to switch to DW2, I would download the appropriate compiler from the MinGW site and just sub it in? Would I just switch the 'g++.exe's?

EDIT: Never mind. I figured it out!
« Last Edit: September 28, 2013, 05:55:09 pm by ramailley »