1
General / The procedure entry point ... could not be located in the dynamic link library.
« on: December 31, 2023, 07:04:40 am »
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:
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.
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;
}
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.