1
General / Re: Cmake problem
« on: October 28, 2014, 04:11:32 pm »
Ok its working!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
link_directories(sfml-graphics;sfml-window;sfml-sytem)
#include <SFML/Graphics.hpp>
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
// window.draw(...);
// end the current frame
window.display();
}
return 0;
}