SFML community forums

Help => General => Topic started by: TheNess on February 07, 2015, 05:48:57 pm

Title: [Solved] Keyboard and Mouse with Ogre3d
Post by: TheNess on February 07, 2015, 05:48:57 pm
hello,

I'm working on an Ogre3d project and I want to use sfml for input only.
I have two questions:

1. can I use functions like sf::Keyboard::isKeyPressed() or sf::Mouse::getPosition() even if I have no SFML window at all and I'm not pulling events via sfml?
2. I'm trying to link statically and I linked to both System and Window libs, but visual studio still don't find sf::Keyboard nor sf::Mouse. (unresolved external symbol...) what do I need to link to in order to make it work?

PS I know the thread that shows how to combine Ogre3d with SFML but there he is creating SFML window and render on it and I rather not do that (since I only use SFML for keyboard & mouse)
thanks!
:)

EDIT: oops it was my mistake. forgot to add some static libs & preprocessor static_lib define.
Title: Re: [Solved] Keyboard and Mouse with Ogre3d
Post by: Laurent on February 07, 2015, 05:59:41 pm
Quote
1. can I use functions like sf::Keyboard::isKeyPressed() or sf::Mouse::getPosition() even if I have no SFML window at all and I'm not pulling events via sfml?
It's clearly stated in the documentation.

Quote
2. I'm trying to link statically and I linked to both System and Window libs, but visual studio still don't find sf::Keyboard nor sf::Mouse. (unresolved external symbol...) what do I need to link to in order to make it work?
Static linking is explained in the tutorials.