'SFML Unresolved external symbol (LINKER FAIL)
#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 e;
while (window.pollEvent(e))
{
if (e.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
I am not sure, why my program doesn't work. I tried to write libraries in input in Linker settings, but still not working. Also I defined SFML_STATIC for preprocessor heading, however I'm not sure do I need this or not.




I want to my code working. Everything was explained above.
Solution 1:[1]
perhaps run your program in both debug and release mode. then copy the bin/dll files over to those folders. also remove SFML_STATIC and you should be good to go, if youre using debug mode be sure to add -d to the linker input! hope this helps.
and also be sure youre using x86 version. you really shouldnt touch x64 unless you have some very specific apps you have to make.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Voidex |
