I have learned the basics of C++ console, and I wanted to move on to SFML to start creating games for practice. However, I came across an issue while installing.
When I try to run the test code (below), an error occurs with "LNK2001", an external symbol issue regarding the
and such. They are, apparently, two unresolved externals.
Any idea on how to fix this?
I've also double checked the libraries and directories that are supposed to be in place, and they seem okay.
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
if (event.type == sf::Event::Closed)
Last edited on
Hm, I thought I gave enough information regarding the issue, oh well. Here's the build output:
1>TEST.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>TEST.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>C:\Users\<computer name>\Documents\Visual Studio 2012\Projects\TEST\Debug\TEST.exe : fatal error LNK1120: 2 unresolved externals
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(611,5): error MSB6006: "link.exe" exited with code 1120.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
So, what happens is the program does not compile and leaves me with this error.
Edit: I forgot to mention that I'm using SFML 2.1, if it matters at all.
Last edited on
You're not linking to the necessary libs. You have to link to the graphic lib.
I did that and I'm still getting the exact same two errors.