Pls Help

Please help me. I have correctly configured, according to ChatGPT, GeminiAi, and the tutorials on Youtube, the SFML library and I am unable to run a program that only creates a window. The SQL version is 3.0.0, and the VS version is 17.14.0. I don't know what else to do. I have tried many methods, but I am unable to get rid of those errors. If it helps, I leave below what appears in the output: Build started at 09:54 PM... 1>------ Build started: Project: configurare, Configuration: Debug x64 ------ 1>configurare.cpp 1>C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\System\Exception.hpp(41,47): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'sf::Exception' 1>(compiling source file 'configurare.cpp') 1> C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\stdexcept(100,30): 1> see declaration of 'std::runtime_error' 1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\System\Exception.hpp(41,23): 1> see declaration of 'sf::Exception' 1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(8,19): error C2512: 'sf::Event': no appropriate default constructor available 1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\Event.hpp(46,7): 1> see declaration of 'sf::Event' 1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(9,23): error C2660: 'sf::WindowBase::pollEvent': function does not take 1 arguments 1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\WindowBase.hpp(226,40): 1> see declaration of 'sf::WindowBase::pollEvent' 1> C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(9,23): 1> while trying to match the argument list '(sf::Event)' 1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(10,23): error C2039: 'type': is not a member of 'sf::Event' 1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\Event.hpp(46,7): 1> see declaration of 'sf::Event' 1>Done building project "configurare.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 09:54 PM and took 05.877 seconds ========== The code is below: #include int main() { sf::VideoMode videoMode(sf::Vector2u(800, 600), 32); sf::RenderWindow window(videoMode, "My Window"); while (window.isOpen()) { sf::Event event; // Aici e corect! while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) { window.close(); } } window.clear(); window.display(); } return 0; } `

Apr 3, 2025 - 20:39
 0
Pls Help

Image description

Please help me. I have correctly configured, according to ChatGPT, GeminiAi, and the tutorials on Youtube, the SFML library and I am unable to run a program that only creates a window. The SQL version is 3.0.0, and the VS version is 17.14.0. I don't know what else to do. I have tried many methods, but I am unable to get rid of those errors. If it helps, I leave below what appears in the output:

Build started at 09:54 PM...
1>------ Build started: Project: configurare, Configuration: Debug x64 ------
1>configurare.cpp
1>C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\System\Exception.hpp(41,47): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'sf::Exception'
1>(compiling source file 'configurare.cpp')
1> C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\stdexcept(100,30):
1> see declaration of 'std::runtime_error'
1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\System\Exception.hpp(41,23):
1> see declaration of 'sf::Exception'
1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(8,19): error C2512: 'sf::Event': no appropriate default constructor available
1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\Event.hpp(46,7):
1> see declaration of 'sf::Event'
1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(9,23): error C2660: 'sf::WindowBase::pollEvent': function does not take 1 arguments
1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\WindowBase.hpp(226,40):
1> see declaration of 'sf::WindowBase::pollEvent'
1> C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(9,23):
1> while trying to match the argument list '(sf::Event)'
1>C:\Users_\OneDrive\Desktop\Proiecte_Visual_Studio\Proiecte\configurare\configurare.cpp(10,23): error C2039: 'type': is not a member of 'sf::Event'
1> C:\Users_\OneDrive\Desktop\SFML-3.0.0\include\SFML\Window\Event.hpp(46,7):
1> see declaration of 'sf::Event'
1>Done building project "configurare.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 09:54 PM and took 05.877 seconds ==========

The code is below:

#include 

int main() {
    sf::VideoMode videoMode(sf::Vector2u(800, 600), 32);
    sf::RenderWindow window(videoMode, "My Window");

    while (window.isOpen()) {
        sf::Event event; // Aici e corect!
        while (window.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                window.close();
            }
        }

        window.clear();
        window.display();
    }

    return 0;
}

`