Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - 1cubealot

Pages: [1]
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.


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;
}

Pages: [1]