Procedure entry point _ZST24__throw_out_of_range_fmtPKcz

I am trying to compile a bit of sample code (below) in Code::Blocks 13.12 with MinGW on Windows 7. When I attempt to compile and run, I get a popup window saying "The procedure entry point _ZSt24__throw_out_of_range_fmtPKcz could not be located in the dynamic link library libstdc++-6.dll."

Here is the build log:
-------------- Run: Debug in Template (compiler: GNU GCC Compiler)---------------

Checking for existence: C:\Users\Colin\Documents\C++\Template 2\Template\bin\Debug\Template.exe
Executing: "C:\Program Files (x86)\CodeBlocks/cb_console_runner.exe" "C:\Users\Colin\Documents\C++\Template 2\Template\bin\Debug\Template.exe" (in C:\Users\Colin\Documents\C++\Template 2\Template\.)
Process terminated with status -1073741511 (0 minute(s), 1 second(s))

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
What version of MinGW are you using?

Have you tried uninstalling, deleting any remnants, and reinstalling?
I'm not sure how to check the version of MinGW. I used the MinGW Installer, so I'm guessing that has something to do with it. I would have liked to download the Code::Blocks version with MinGW attached, but the internet where I am is too slow to handle that, so I am fairly limited in that aspect (also why I'm using Code::Blocks instead of Visual Studio).

I have tried uninstalling, deleting remnants, and reinstalling everything, but I still have the same issue. I could try removing MinGW, and re-downloading the installer if it's possible I have an outdated version of that.
If you can access MinGW from the command line at all, just run g++ --version

If you're not building SFML yourself, you need to be linking to the correct libraries (version, debug/release, OS, etc). If you are building SFML yourself, you may need to try again with different settings.
Last edited on
Okay, quick update on this. I uninstalled MinGW and Code::Blocks, and was able to download the version of Code::Blocks with MinGW attached, but I am still having the same issue. I also tried re-downloading SFML, and that didn't help either. I am linking to the correct libraries. I Googled it a bit, and libgcc_s_dw2-1.dll as well as libstdc++-6.dll seem to be the issue, but I'm still not sure how to fix this.
Are you linking to the correct versions of the SFML libs? There are static and dynamic + debug and release (2x2 = 4) for each library.
Topic archived. No new replies allowed.