Hello guys,
I followed the official tutorial step-by-step but cant reach it to work. I copied the example code into my main.cpp, but when compiling in "Debug" I get this error:
Severity Code Description Project File Line Suppression State
Error LNK1112 module machine type 'x64' conflicts with target machine type 'X86' Win32Project1 G:\decision\Win32Project1\Win32Project1\sfml-graphics-s-d.lib(RenderStates.cpp.obj) 1
I am using Visual Studio 2015 with SFML 2.4.1 and linked every .lib file (including sfml-main.lib). I am using the static version of SFML. Any Ideas? If I missed something, feel free to ask the information that needs to be provided:)
The error message is pretty clear: you try to use 64-bit libraries in a 32-bit project.
Just noticed that too.. But using the 32 Bit Version of SFML did not resolve the error, I get a way longer Error-Message now. Any ideas? :/
Error-Message (Example, getting 67 of those):
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol _glClear@4 referenced in function "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) Win32Project1 G:\decision\Win32Project1\Win32Project1\sfml-graphics-s-d.lib(RenderTarget.cpp.obj) 1
Which libraries did you link? If possible, post your full linker command.
Debug:
sfml-audio-s-d.lib;sfml-graphics-s-d.lib;sfml-system-s-d.lib;sfml-window-s-d.lib;sfml-main-d.lib;flac.lib;freetype.lib;jpeg.lib;ogg.lib;openal32.lib;vorbis.lib;vorbisenc.lib;vorbisfile.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;%(AdditionalDependencies)
Release:
sfml-audio-s.lib;sfml-graphics-s.lib;sfml-main.lib;sfml-network-s.lib;sfml-system-s.lib;sfml-window-s.lib;flac.lib;freetype.lib;jpeg.lib;ogg.lib;openal32.lib;vorbis.lib;vorbisenc.lib;vorbisfile.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;%(AdditionalDependencies)