Well about the debug thing i tried all the thing i can think but i don't know how to make it work ... i try to put SFML_STATIC with and without release works but debug don't i put all the dependencies -d files but i don't know who to make it work.
Here is the debug output:
1>------ Build started: Project: Nagix V1.1, Configuration: Debug Win32 ------
1>Build started 10/24/2013 11:12:58 PM.
1>InitializeBuildStatus:
1> Touching "Debug\Nagix V1.1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> SoundEngine.cpp
1> RenderEngine.cpp
1> Player.cpp
1> main.cpp
1>d:\programs\programare\game\nagix v1.1\nagix v1.1\main.cpp(49): warning C4996: 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.
1> d:\programs\visual studio 2012\vc\include\conio.h(131) : see declaration of 'getch'
1> Generating Code...
1>sfml-audio-s.lib(SoundStream.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(SoundStream.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>sfml-audio-s.lib(Music.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(Music.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>sfml-audio-s.lib(SoundSource.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(SoundSource.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>sfml-audio-s.lib(AudioDevice.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(AudioDevice.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>sfml-audio-s.lib(SoundFile.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(SoundFile.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>sfml-audio-s.lib(ALCheck.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>sfml-audio-s.lib(ALCheck.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>RenderEngine.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>sfml-audio-s.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol "public: static class sf::Time const sf::Time::Zero" (?Zero@Time@sf@@2V12@B) referenced in function "private: bool __thiscall sf::SoundStream::fillAndPushBuffer(unsigned int)" (?fillAndPushBuffer@SoundStream@sf@@AAE_NI@Z)
1>D:\Programs\Programare\Game\Nagix V1.1\Debug\Nagix V1.1.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.31
And i tried to simplified my code but it still don't work i tried to run it off the main.
void x()
{
while (1==1)
{
if(sf::Keyboard::isKeyPressed(sf::Keyboard::W))
{
std::cout << "Player moved Up" << std::endl;
}
}
}
int main()
{
sf::Thread a(&x);
a.launch();
std::cout << "ok" << std::endl;
getch();
return 0;
}
It's still crashes when i press a key ... maybe this is not the right way to do it ... i don't know.