SFML community forums

Help => General => Topic started by: Sanction on January 10, 2018, 02:48:23 am

Title: [SOLVED] sf::Event help
Post by: Sanction 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 (https://imgur.com/a/w6uUR)


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

Thanks!
Sanction
Title: Re: sf::Event help
Post by: eXpl0it3r 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_.
Title: Re: sf::Event help
Post by: Sanction 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.