I cannot find anything that works, and I don't know where to go. The task is quite simple, to just include SFML as a library in my C++ file, but every time I try, I get some sort of error. I am using the sample code from SFML:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
And this is my c_cpp_properties.json file:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:\\SFML-2.5.1\\include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\mingw64\\bin\\gcc.exe",
"cStandard": "gnu17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}
It seems so simple, and yet I just can't figure out what I'm doing wrong. I am using MinGW 64 bit, and the matching SFML version. I am coding in VSCode with extensions such as the C/C++ extension and code-runner (have tried to compile manually as well). I have added both the MinGW64 and SFML bin path to Enviroment variables path. I am new to C++ (Python earlier).
Edit
To answer some questions, the directory does include the correct files, which is why I am so confused. And I tried to switch the \ for /, but didn't work:/. And the error (embarrassing I forgot it) is:
testing.cpp:1:10: fatal error: SFML/Graphics.hpp: No such file or directory