1

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?

genpfault
  • 51,148
  • 11
  • 85
  • 139

2 Answers2

7

Direct to the 32 bit versions of the library.

Eric Smekens
  • 1,602
  • 20
  • 32
0

For OpenGL you may also need glu32.lib and opengl32.lib

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Blood
  • 4,126
  • 3
  • 27
  • 37