I am attempting to develop a game and have run into a problem early. I can compile this code but the executable will not run on Linux:
// Main.cpp \\
#include <SFML/Graphics.hpp>
using namespace sf;
int main(int argc, char *argv[])
{
RenderWindow window(VideoMode(1366, 768), "Time Sheep");
RectangleShape player(Vector2f(200, 200));
while(window.isOpen())
{
Event event;
while(window.pollEvent(event))
{
if(event.type == Event::Closed)
{
window.close();
return 1;
}
}
window.clear();
window.draw(player);
window.display();
}
}
Please help me the other forum posts with this problem don't help.
EDIT: This is what you get when trying to watch TV and make a forum post: forgetting to put the error.
Here it is:
./TimeSheep: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory