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

Author Topic: SFML shows error squiggles even though it works  (Read 2044 times)

0 Members and 1 Guest are viewing this topic.

geekz

  • Newbie
  • *
  • Posts: 7
    • View Profile
SFML shows error squiggles even though it works
« on: April 09, 2022, 08:12:52 pm »
I took a break from SFML development for a while and when I went back today, saw C++ extension had some updates so I installed it and I'm getting error squiggles even though the application works. Anyone got idea why? Is it because of the extension? I'd like to get rid of these error squiggles, it's just annoying...

Maybe worth to mention:
  • I use WSL on Visual Studio Code, windows 10
  • The version of VSC I use is 1.66.1
  • I've tried to set ${workspaceFolder}/** in includePath but it still doesn't remove the error squiggles

Screenshot is attached, as you see, the application runs just fine but the SFML errors are everywhere, I just don't understand why.

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: SFML shows error squiggles even though it works
« Reply #1 on: April 12, 2022, 12:58:19 pm »
well, you need at least to post what these errors are
probably not errors, but warnings
Visit my game site (and hopefully help funding it? )
Website | IndieDB

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML shows error squiggles even though it works
« Reply #2 on: April 12, 2022, 01:27:22 pm »
I recommend using CMake when working with VS Code, otherwise you'll need to maintain your own make file or similar, which isn't as great...

Either way, you need to somehow tell VS Code where to find the SFML headers.
If you use the pure C++ extension, you need to edit the c_cpp_properties.json (and tasks.json?) to add the path to the SFML include/ directory.

More details on how to configure VS Code can be found:
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything