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

Author Topic: The code does not function when the SFML library is connected.  (Read 2680 times)

0 Members and 1 Guest are viewing this topic.

barabam

  • Newbie
  • *
  • Posts: 1
    • View Profile
I tried to connect the SFML library in Visual Studio 2022, but the code I copied from an external source did not run and threw errors related to the "event" variable.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: The code does not function when the SFML library is connected.
« Reply #1 on: August 30, 2024, 11:26:12 am »
I recommend to not use using namespace sf;.

VS somehow thinks sf::Event is incomplete.
Make sure you're including the correct headers.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/