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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Petwoip

Pages: [1]
1
Window / [SFML 2.0] sf::Keyboard::IsKeyPressed LNK2019 error
« on: January 29, 2012, 10:21:33 am »
Thanks for the tip, definitely comes in handy!

2
Window / [SFML 2.0] sf::Keyboard::IsKeyPressed LNK2019 error
« on: January 29, 2012, 09:46:11 am »
Aha! I defined SFML_STATIC in one class that uses SFML but not in the other. I added it to the other and now the program compiles.

So from now on will I have to define SFML_STATIC in every class that uses non-header SFML functionality?

3
Window / [SFML 2.0] sf::Keyboard::IsKeyPressed LNK2019 error
« on: January 29, 2012, 09:22:06 am »
Ah, should have mentioned my links (in this order):

opengl32.lib
sfml-audio-s-d.lib
sfml-graphics-s-d.lib
sfml-main-d.lib
sfml-network-s-d.lib
sfml-system-s-d.lib
sfml-window-s-d.lib

I've tried changing the order around a bit, but no difference.
Note: I have release mode versions too.

4
Window / [SFML 2.0] sf::Keyboard::IsKeyPressed LNK2019 error
« on: January 29, 2012, 06:19:47 am »
Hey,

I've been setting up SFML2.0 and I've been able to generate a render window with openGL in it. Now I'm trying to take keyboard and mouse input. However, when I try:

sf::Mouse::IsButtonPressed(button);       or
sf::Keyboard::IsKeyPressed(keyCode);

I get:

error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Keyboard::IsKeyPressed(enum sf::Keyboard::Key)" (__imp_?IsKeyPressed@Keyboard@sf@@SA_NW4Key@12@@Z) referenced in ...
error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Mouse::IsButtonPressed(enum sf::Mouse::Button)" (__imp_?IsButtonPressed@Mouse@sf@@SA_NW4Button@12@@Z) referenced in ...
(Happens in both release and debug mode. Note: I am using static libraries)

If all of my other SFML2 setup works so far, how come IsKeyPressed and IsButtonPressed do not work?

Thanks!

Pages: [1]