I cannot get GLEW to link correctly with my program.
I have the path correct in my project (I’ve triple checked), I have tried building from scratch, using the x86 libs (all 4 – the -s, -mxs, etc) AND the x64 libs.
I have tried using the #pragma directive instead of configuring my project in properties.
I am trying to get it as a static lib so no DLLs will be necessary.
I also have GLEW_STATIC defined, as the build instructions advise.
Error message:
OGLInit.obj : error LNK2019: unresolved external symbol _glewInit@0
referenced in function “bool __stdcall vexal::OGLStartup(void)”
(?OGLStartup@vexal@@YG_NXZ)
I’ve even used dumpbin to check that initGlew is there. It is, and it is external.
I’ve also verified it’s found the lib.
Searching
C:\Users\Jake\Documents\Vexal2\vexal\vc9_x86\lib\Debug\GLEW.lib:
I’ve run out of ideas here. Any help?
The problem was the calling convention. I changed the calling convention settings to
__stdcallinstead of__cdecl, changed_glfwTerminate_atexit( void )to __cdecl in the GLFW code I had, and then built.Fixed!