1
General / How can I use SMFL for g++ compiler version 11.2.0
« on: June 18, 2023, 03:05:05 pm »
Hi.
I am trying to compile just a window program but it hasn't comiled ever. I have a main.cpp file and I have a smfl file which has all the folders in it and I want to know how to build it using g++. I am using sublime text.
I am trying to compile just a window program but it hasn't comiled ever. I have a main.cpp file and I have a smfl file which has all the folders in it and I want to know how to build it using g++. I am using sublime text.
Quote
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Window");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear(sf::Color::Black);
// Draw your SFML objects here
window.display();
}
return 0;
}