c++ - OpenGL Linking problems -
i trying build opengl app in c++. use glew , glfw libraries. wanted create textures, says:
1>model.obj : error lnk2019: unresolved external symbol __imp_glbindtexture referenced in function "public: void __cdecl texture::bind(unsigned int)" (?bind@texture@@qeaaxi@z) 1>model.obj : error lnk2019: unresolved external symbol __imp_glgentextures referenced in function "public: bool __cdecl texture::load(void)" (?load@texture@@qeaa_nxz) 1>model.obj : error lnk2019: unresolved external symbol __imp_glteximage2d referenced in function "public: bool __cdecl texture::load(void)" (?load@texture@@qeaa_nxz) 1>model.obj : error lnk2019: unresolved external symbol __imp_gltexparameterf referenced in function "public: bool __cdecl texture::load(void)" (?load@texture@@qeaa_nxz) 1>c:\users\dynamitos5\documents\cuda\opengltest\external\lib\magickdb.lib : warning lnk4272: library machine type 'x86' conflicts target machine type 'x64' 1>c:\users\dynamitos5\documents\cuda\opengltest\external\lib\magickrl.lib : warning lnk4272: library machine type 'x86' conflicts target machine type 'x64' 1>c:\users\dynamitos5\documents\cuda\opengltest\x64\debug\opengltest3.exe : fatal error lnk1120: 16 unresolved externals
everything worked far(glgenvertexarrays(), gldrawarrays(), etc.), texture functions(glgentextures(), glbindtexture(), etc.) don't work. linker set this: glew32.lib;glfw3.lib;assimp.lib;devil.lib;magickdb.lib;magickrl.lib;%(additionaldependencies)
vc include dir: c:\users\dynamitos5\documents\cuda\opengltest\external\include;$(includepath)
vc lib dir: c:\users\dynamitos5\documents\cuda\opengltest\external\lib;$(librarypath)
all functions opengl 1.1 implemented directly in opengl32.lib
library. other functions available through extension , have loaded manually (or using library glew).
in case, missing link agains opengl32.lib
.
Comments
Post a Comment