# opencv_core246.lib(gl_core_3_1.obj) : error LNK2001: unresolved external symbol __imp_wglGetProcAddress

I built OpenCV 2.4.6 from source and that built fine. Next I try to incorporate it in my application and upon doing so I get the link error:

opencv_core246.lib(gl_core_3_1.obj) : error LNK2001: unresolved external symbol __imp_wglGetProcAddress


Has anyone seen this and have an idea on how to fix it?

Check CMake variables OPENGL_gl_LIBRARY and OPENGL_glu_LIBRARY.