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

Author Topic: The procedure entry point ... could not be located in the dynamic link library.  (Read 876 times)

0 Members and 1 Guest are viewing this topic.

PrancerFrisco

  • Newbie
  • *
  • Posts: 1
    • View Profile
I have tried installing the SFML library for C++, however after compiling my program I get this error:

The procedure entry point _ZNSt15basic_streambuflcSt11char_traitslcEE7seekposESt4fposliESt13_los_Openmode could not be located in the dynamic link library C:\SFML-2.6.1\bin\sfml-system-2.dll.

My code:

#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;
}

 


I compiled the code like this: g++ main.cpp -o main -I"C:\SFML-2.6.1\include" -L"C:\SFML-2.6.1\lib" -lsfml-graphics -lsfml-window -lsfml-system



I am using Windows 11 x64, VSCode, SFML for 64 bit.

Thank you.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Sounds like you're using a different runtime library than the one used for building SFML. Make sure you're using the exact same compiler, there are links on the download page to download the matching one.

Or better yet, just use the SFML CMake template, which will automatically build SFML for you with your chosen compiler: https://www.sfml-dev.org/tutorials/2.6/start-cmake.php
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything