[英]unresolved external symbol even though i think i am linking correctly (MSVC)
i have a project that is using SDL as an external library. 我有一个使用SDL作为外部库的项目。 The project uses functions such as _SDL_WM_SetCaption, _SDL_FillRect or _SDL_MapRGBA.
该项目使用_SDL_WM_SetCaption,_SDL_FillRect或_SDL_MapRGBA等函数。 I have told the linker to include the two libraries SDL.lib and SDLmain.lib and have told it to look in the folder where these libraries are placed.
我已告诉链接器包含两个库SDL.lib和SDLmain.lib并告诉它查看放置这些库的文件夹。 I have also inspected the library files with dumpbin.exe and the functions are there.
我还用dumpbin.exe检查了库文件,函数就在那里。 however, it still doesnt work compiling/linking?
但它仍然无法编译/链接? why?
为什么? anyone have any ideas?
有人有想法么?
edit: here is an example output of the linker/compiler error: 编辑:这是链接器/编译器错误的示例输出:
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_WM_SetCaption referenced in function "public: void __thiscall SDLGLEngine::SetTitle(char *)" (?SetTitle@SDLGLEngine@@QAEXPAD@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_FillRect referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_MapRGBA referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_SetVideoMode referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_GL_SetAttribute referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_Quit referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
14>libtestd.lib(sdlgl.obj) : error LNK2019: unresolved external symbol _SDL_Init referenced in function "public: bool __thiscall SDLGLEngine::Init(int,int,int,bool)" (?Init@SDLGLEngine@@QAE_NHHH_N@Z)
Possible reasons: 可能的原因:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.