I am trying to use a graphics library (SFML) for c++, and I am having issues. I use Visual Studio 2017. I have watched many Youtube tutorials, and get the same error with every one I try. I can't find the solution, as people are saying "the folders need to be together" which I have already done:
Here are the errors I get:
E1696 cannot open source file "stdafx.h" c:\Users\George\source\repos\Game\Game\main.cpp 1
E0065 expected a ';' c:\Users\George\source\repos\Game\Game\main.cpp 5
E1696 cannot open source file "SFML/Graphics.hpp" c:\Users\George\source\repos\Game\Game\main.cpp 2
C1083 Cannot open include file: 'stdafx.h': No such file or directory c:\users\george\source\repos\game\game\main.cpp 1
The code I am running (copied, with extra):
#include <stdafx.h>
#include <SFML/Graphics.hpp>
using namespace std
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;
}
Before, the code did not have the stdafx.h or namespace std so I had to add them because I had other errors. I would greatly appreciate any help. Thanks