0
votes

Ok so recently I'v made the jump from VS 2013 to VS 2015 and I wanted to start a new SDL project I followed the steps on here to the letter and for some reason I get these linker errors whenever I try to compile my code.

error 1:

Warning LNK4098 defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library SDLtutorial c:\Users\Nas\documents\visual studio 2015\Projects\SDLtutorial\SDLtutorial\MSVCRTD.lib(initializers.obj) 1

error 2:

Error LNK2019 unresolved external symbol __imp__fprintf referenced in function _ShowError SDLtutorial c:\Users\Nas\documents\visual studio 2015\Projects\SDLtutorial\SDLtutorial\sdl2main.lib(SDL_windows_main.obj) 1

error 3:

Error LNK2019 unresolved external symbol __imp____iob_func referenced in function _ShowError SDLtutorial c:\Users\Nas\documents\visual studio 2015\Projects\SDLtutorial\SDLtutorial\sdl2main.lib(SDL_windows_main.obj) 1

1

1 Answers

0
votes

It looks like SDL was compiled with a different version of Visual Studio (probably VS2013). You should either make sure that you're using the correct version of SDL's .lib file for your version of Visual Studio, or grab the Source Code from SDL and compile a library yourself.

Also, error 1 can be safely ignored most of the time.