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

Author Topic: Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”  (Read 3142 times)

0 Members and 1 Guest are viewing this topic.

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”
« on: January 06, 2022, 06:55:44 pm »
I followed the tutorial on setting up SFML for Visual Studio, as well as some other tutorials, but when I add:
#include <SFML/Graphics.hpp>
Visual Studio gives me an error saying, “Cannot open header file ‘SFML/Graphics.hpp’”.
In Properties->C/C++->General, I added C:\Users\zeffb\Documents\C++\SFML-2.5.1\include
That folder contains a folder called “SFML” which has in it files such as “Graphics.hpp”.
I also linked all the .lib files.
What am I doing wrong?
Online I am: firet; flesheatindragon; Future Games.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”
« Reply #1 on: January 06, 2022, 07:07:48 pm »
Did you do it for the correct configuration? (debug/release, 32bits/64bits)

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
Re: Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”
« Reply #2 on: January 06, 2022, 07:39:03 pm »
I tried changing to release as I had linked the release .lib files. I also tried x86, x64 and Win32. Still nothing.
Online I am: firet; flesheatindragon; Future Games.

firet

  • Newbie
  • *
  • Posts: 15
  • Gamedev, web dev and C++ programmer.
    • View Profile
    • Future Games official site
    • Email
Re: Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”
« Reply #3 on: January 07, 2022, 02:47:59 am »
UPDATE: I fixed it. I’ll soon be posting a Google Docs link to a tutorial for Visual Studio 2019.
Online I am: firet; flesheatindragon; Future Games.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Visual Studio 2019 Cannot find file “SFML/Graphics.hpp”
« Reply #4 on: January 07, 2022, 08:53:52 am »
Eager to see, I really wonder what the official SFML tutorial is missing

 

anything