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

Author Topic: [SOLVED] sf::Event help  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

Sanction

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
[SOLVED] sf::Event help
« on: January 10, 2018, 02:48:23 am »
I'm following the SFML Game Develoment by Example and I'm having a problem with the EventManager class. I know that the sf::Event have changed in the past versions of SFML. Can anyone help me out with this crazy error?

*Note I'm using SFML 2.4.2*

Error:https://imgur.com/a/w6uUR


Code:
GitHub: https://github.com/SanctionMan/SFML_Project
(click to show/hide)

Thanks!
Sanction
« Last Edit: January 10, 2018, 12:21:43 pm by Sanction »
Knowledge comes, but wisdom lingers. It may not be difficult to store up in the mind a vast quantity of facts within a comparatively short time, but the ability to form judgments requires the severe discipline of hard work and the tempering heat of experience and maturity.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: sf::Event help
« Reply #1 on: January 10, 2018, 08:16:30 am »
The errors indicate that you're either not linking SFML at all, or that you're linking a wrong version.

If m_code isn't of type sf:: Keyboard::Key, I suggest to use the C++ static_cast instead of C-style cast. That way it's easier to read and understand.
Also a public member shouldn't use the prefix m_.
« Last Edit: January 10, 2018, 08:18:37 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sanction

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: sf::Event help
« Reply #2 on: January 10, 2018, 12:21:17 pm »
Thanks eXpl0it3r, I completely forgot to compile with x86 instead of x64 when I pulled it from Github.
Knowledge comes, but wisdom lingers. It may not be difficult to store up in the mind a vast quantity of facts within a comparatively short time, but the ability to form judgments requires the severe discipline of hard work and the tempering heat of experience and maturity.

 

anything