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

Author Topic: [QUERY] Visual Studio 2019 Cannot open source file "SFML/Graphics.hpp" : SFML  (Read 5558 times)

0 Members and 1 Guest are viewing this topic.

Cook

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
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

Kvaz1r

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Email
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.

Druidpeter

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
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?

« Last Edit: November 20, 2020, 09:03:53 pm by Druidpeter »

Kvaz1r

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Email
Kvaz1r, hopefully, this will help you with your setup as well?

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

Cook

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
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?

 

anything