SFML community forums

Help => General => Topic started by: Cook on October 29, 2020, 11:02:50 am

Title: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML
Post by: Cook on October 29, 2020, 11:02:50 am
Hi,
I can't seem to open SFML/Graphics.HPP

I've followed the instructions on the tutorial link below but I keep getting the error.

Under C/C++->General->Additional Include Directories
C:\Users\user\Documents\Visual Studio 2019\SFML-2.5.1\include\SFML
This is where the Graphics.hpp file is.

Under C/C++->Preprocessor->Preprocessor Definitions
SFML_STATIC;

Under Linkers->Input
opengl32.lib;winmm.lib;gdi32.lib;sfml-graphics.lib;sfml-window.lib;sfml-system.lib;sfml-network.lib;sfml-audio.lib;

Could someone help me?

Thank you.

References
https://www.sfml-dev.org/tutorials/2.5/start-vc.php
Title: Re: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML
Post by: Kvaz1r on October 29, 2020, 07:32:21 pm
Can you attach your project files here? It seems that you don't set include path properly. Maybe didn't change configuration (Debug|Release) or something else.
Title: Re: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML
Post by: Druidpeter on November 20, 2020, 08:25:50 pm
I have exactly the same issue. I've followed the instructions on the tutorial on the website for a 64-bit version using static debug libraries, and the visual studio 2019 says that it can't access the file in question.

I have attached my project. Hopefully you guys can figure out what's going on?

:Edit:

Hey, so I figured out what was wrong with my build. I built the libraries for x64 projects, but the active platform was x86 for the project. I changed the project platform to x64, and I was good to go. Kvaz1r, hopefully, this will help you with your setup as well?

Title: Re: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML
Post by: Kvaz1r on November 20, 2020, 10:59:28 pm
Kvaz1r, hopefully, this will help you with your setup as well?

Hey, my setup is ok, topic started is other user ;)
Title: Re: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML
Post by: Cook on March 09, 2021, 07:27:17 am
Kvaz1r, hopefully, this will help you with your setup as well?

Hey, my setup is ok, topic started is other user ;)

I solved the problem using Youtube.

Thank you.

How do I mark this post as solved?