I’m getting this error when trying to compile:
*1>main-light.obj : error LNK2019: unresolved external symbol _SDL_FreeSurface referenced in function “private: unsigned int __thiscall objloader::loadTexture(char const *)” (?loadTexture@objloader@@AAEIPBD@Z) 1>main-light.obj : error LNK2019:
unresolved external symbol _SDL_LoadBMP_RW referenced in function
“private: unsigned int __thiscall objloader::loadTexture(char const
*)” (?loadTexture@objloader@@AAEIPBD@Z) 1>main-light.obj : error LNK2019: unresolved external symbol _SDL_RWFromFile referenced in
function “private: unsigned int __thiscall objloader::loadTexture(char
const *)” (?loadTexture@objloader@@AAEIPBD@Z) 1>main-light.obj : error
LNK2019: unresolved external symbol _SDL_GetTicks referenced in
function “public: void __thiscall Player::init(void)”
(?init@Player@@QAEXXZ) 1>main-light.obj : error LNK2019: unresolved
external symbol _SDL_GetKeyState referenced in function “void __cdecl
Control(float,float,bool)” (?Control@@YAXMM_N@Z) 1>main-light.obj :
error LNK2019: unresolved external symbol _SDL_WarpMouse referenced in
function “void __cdecl Control(float,float,bool)”
(?Control@@YAXMM_N@Z) 1>main-light.obj : error LNK2019: unresolved
external symbol _SDL_GetMouseState referenced in function “void
__cdecl Control(float,float,bool)” (?Control@@YAXMM_N@Z) 1>main-light.obj : error LNK2019: unresolved external symbol
_SDL_ShowCursor referenced in function “void __cdecl Control(float,float,bool)” (?Control@@YAXMM_N@Z) 1>main-light.obj :
error LNK2019: unresolved external symbol _SDL_Delay referenced in
function _SDL_main 1>main-light.obj : error LNK2019: unresolved
external symbol _SDL_GL_SwapBuffers referenced in function _SDL_main
1>main-light.obj : error LNK2019: unresolved external symbol
_SDL_PollEvent referenced in function _SDL_main 1>main-light.obj : error LNK2019: unresolved external symbol _SDL_SetVideoMode referenced
in function _SDL_main 1>main-light.obj : error LNK2019: unresolved
external symbol _SDL_Init referenced in function _SDL_main
1>MSVCRT.lib(wcrtexew.obj) : error LNK2019: unresolved external symbol
wWinMain@16 referenced in function __tmainCRTStartup 1>C:\Users\Name\Desktop\Projects\FPS\Debug\FPS.exe : fatal error
LNK1120: 14 unresolved externals*
I tried to change to a console application and it didn’t work.
How can I fix it?
For OpenGL you may also need glu32.lib and opengl32.lib