1
Window / Re: key press problems
« on: April 22, 2015, 06:21:46 am »
Ah yes, that was it. Thank you very much!
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.
// in InputManager.h
sf::Event mEvent;
//in InputManager.cpp
while (Game::getInstance()->getGraphicsSystem()->pollEvent(mEvent))
{
if (mEvent.type == sf::Event::KeyPressed)
{
if (mEvent.key.code == sf::Keyboard::Space)
{
std::cout << "the space key was pressed" << std::endl;
}
}
}
//the poll event
bool GraphicsSystem::pollEvent(sf::Event theEvent)
{
return mWindow.pollEvent(theEvent);
}
1>------ Build started: Project: FinalProject, Configuration: Debug Win32 ------
1> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /I"SFML-2.2/include" /I../../../shared/DeanLib /ZI /W3 /WX- /sdl /Od /Oy- /D SFML_STATIC /D _MBCS /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp
1>
1> Skipping... (no relevant changes detected)
1> main.cpp
1> Microsoft (R) Incremental Linker Version 12.00.21005.1
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> "/OUT:C:\Users\Gabrielle\Desktop\Game Arch\Final Project\Gabby.Mary.FinalProject\FinalProject\Debug\FinalProject.exe" /INCREMENTAL "/LIBPATH:SFML-2.2/lib" /LIBPATH:../../../shared/DeanLib/ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "sfml-graphics-d.lib" "sfml-window-d.lib" "sfml-audio-d.lib" "sfml-network-d.lib" "sfml-main-d.lib" "sfml-system-d.lib" ../../../shared/DeanLib/Debug/DeanLib.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG "/PDB:C:\Users\Gabrielle\Desktop\Game Arch\Final Project\Gabby.Mary.FinalProject\FinalProject\Debug\FinalProject.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Gabrielle\Desktop\Game Arch\Final Project\Gabby.Mary.FinalProject\FinalProject\Debug\FinalProject.lib" /MACHINE:X86 Debug\main.obj
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>C:\Users\Gabrielle\Desktop\Game Arch\Final Project\Gabby.Mary.FinalProject\FinalProject\Debug\FinalProject.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========