1
General / Cannot run basic tutorial code on Visual Studio 2013
« on: March 20, 2014, 09:08:54 pm »
Hello,
I am attempting to use SFML with Visual Studio 2013. Because there was no version of SFML that was compatible, I compiled with CMake.
I then set all of the project settings as specified in the Visual Studio tutorial.
I can run this program
but when I uncomment the RenderWindow line like this
I get the following error (among others):
Any suggestions?
I am attempting to use SFML with Visual Studio 2013. Because there was no version of SFML that was compatible, I compiled with CMake.
I then set all of the project settings as specified in the Visual Studio tutorial.
I can run this program
#include <SFML/Graphics.hpp>
int main()
{
//sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
return 0;
}
int main()
{
//sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
return 0;
}
but when I uncomment the RenderWindow line like this
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
return 0;
}
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
return 0;
}
I get the following error (among others):
error LNK2019: unresolved external symbol __imp__glReadPixels@28 referenced in function "public: class sf::Image __thiscall sf::RenderWindow::capture(void)const " (?capture@RenderWindow@sf@@QBE?AVImage@2@XZ) <Path to visual studio project>\sfml-graphics-s-d.lib(RenderWindow.obj) Project1
Any suggestions?