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.