I have been trying to set up SDL2 to work with VS Community 2015 for the last two days. I have been trying to execute this basic code:
#include "SDL.h"
int main(int argc, char* argv[])
{
return 0;
}
But I keep getting the following build errors:
1>------ Build started: Project: Win32Project2, Configuration: Debug Win32 ------
1>MSVCRTD.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _ShowError
1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp____iob_func referenced in function _ShowError
1>M:\Programming\Applications\Win32Project2\Debug\Win32Project2.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have properly set the Includes to the SDL Include folder and the Library to the x86 folder respectively. I have also added SDL2.lib & SDL2main.lib to the Additional Dependencies. I have a copy of the SDL2.DLL file in both the System32 and WOW64 Directory. Am I missing something? I linked to DirectX with zero issues... but cannot get SDL to work at all?
I have, the setup tutorial instructions leave off with Visual Studio 2013. I am going to try Code::Blocks and see if works there, otherwise I'm out of ideas.
I am going to try to recompile the SDL code as suggested. Code::Blocks was a no go. The only reason I am doing this is because trying to start with DirectX seemed too difficult. SDL seems a tad simpler to get going and see results.