Not sure what exactly I'm doing wrong.
Specifics:OS: Win 8.1
Target IDE: VS2013 Update 4
Using cmake 3.1.0 win32 x86 (cmake-gui.exe)
Building from SFML-2.2-sources.zip (downloaded from the website, extracted from zip)
Problem:Following the
Compiling SFML (2.2) with CMake guide, I have successfully built and used the dynamic libraries (BUILD_SHARED_LIBS flag TRUE) both in Release and Debug. However, when I try to use the static libraries I built, I get LNK2001 and LNK2019 unresolved external symbol errors out the wazoo.
Here are the steps I've taken, with some screenshots:Ran cmake-gui.exe
Pressed Configure
Selected Visual Studio 12 2013 with 'Use default native compilers'Adjusted Settings to what they are in the screenshotPressed Configure again
Pressed Generate
Opened VS2013
Built the 'ALL_BUILD' project on Release
Built the 'INSTALL' project on Release
Built the 'ALL_BUILD' project on Debug
Built the 'INSTALL' project on Debug
This successfully output all the appropriate .lib files in my SFML\lib folder (note: non -s .libs in this folder were built with the BUILD_SHARED_LIBS flag TRUE and work).
Configured Project Properties > Linker > Additional Dependencies (this screenshot is for debug)
And here's the code I'm trying to run (again, works fine with dynamic libraries, but gives linker errors with static libraries):#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "asdf");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
switch (event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::KeyPressed:
if (event.key.code == sf::Keyboard::Escape)
{
window.close();
}
break;
}
}
window.clear();
window.display();
}
return 0;
}
Sample error:Error 1 error LNK2019: unresolved external symbol __imp__glBlendFunc@8 referenced in function "private: void __thiscall sf::RenderTarget::applyBlendMode(struct sf::BlendMode const &)" (?applyBlendMode@RenderTarget@sf@@AAEXABUBlendMode@2@@Z) E:\cppproj\asdf\asdf\sfml-graphics-s-d.lib(RenderTarget.obj) asdf