SFML community forums

Help => General => Topic started by: ToneXum on December 11, 2022, 07:49:39 pm

Title: VS Code cannot open .hpp files even with correct include Path
Post by: ToneXum 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?
Title: Re: VS Code cannot open .hpp files even with correct include Path
Post by: eXpl0it3r 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 (https://github.com/SFML/cmake-sfml-project)) which should then remove the need to manually specify include directories (regardless if VS or VS Code).
Title: Re: VS Code cannot open .hpp files even with correct include Path
Post by: ToneXum 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
Title: Re: VS Code cannot open .hpp files even with correct include Path
Post by: ToneXum 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...