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

Author Topic: VS Code cannot open .hpp files even with correct include Path  (Read 692 times)

0 Members and 1 Guest are viewing this topic.

ToneXum

  • Newbie
  • *
  • Posts: 6
    • View Profile
VS Code cannot open .hpp files even with correct include Path
« on: December 11, 2022, 07:49:39 pm »
I have recently switched from using Visual Studio Community (The purple one everyone uses) to Visual Studio Code (the blue one). Problem is that in the "c_cpp_properties.json" file i have to specify some additional include directories. I did but intelliSense is still telling me that the .hpp files in the include/SFML directory cannot be opened.

So I tried something. Just created another .hpp file and put it in the directory of basicly every other .hpp file. For some reason it works.

So VS Code doesnt like the SFML exclusive header files or something?
Or do I have forgotten some Setting?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10849
    • View Profile
    • development blog
    • Email
Re: VS Code cannot open .hpp files even with correct include Path
« Reply #1 on: December 12, 2022, 10:52:54 am »
Check the permissions you have set on the files.

Personally, I'd recommend to stick with Visual Studio if you've already got it.
Additionally, I recommend using CMake (e.g. with the CMake SFML template) which should then remove the need to manually specify include directories (regardless if VS or VS Code).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ToneXum

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS Code cannot open .hpp files even with correct include Path
« Reply #2 on: December 12, 2022, 05:48:04 pm »
I tried the stuff with cmake but it seems like it doesnt feel like working right now. Ill stick to Visual Studio for now

ToneXum

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS Code cannot open .hpp files even with correct include Path
« Reply #3 on: December 12, 2022, 06:27:15 pm »
Great, for some reason Visual Studio is telling me the same thing  ::)

EDIT: Nevermind it works for Visual Studio now...
« Last Edit: December 12, 2022, 06:47:00 pm by ToneXum »

 

anything