I got SFML installed in CLion but i am running into some issues when i try to run some basic code to see if it works properly.
#include <SFML/Window.hpp>
int main()
{
sf::Window 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();
}
}
return 0;
}
this has no errors but it does not work properly,i get this when i run itProcess finished with exit code -1073741515 (0xC0000135)
. Any ideas on how this could be fixed?
this is a picture of the code if it helps you
For your linker flags, you need to add sfml-window
and sfml-system
.