wglGetCurrentDC unresolved external
<p>I guess I've been driven into a thunder for this kind of problem. I'm using visual studio 2015 community with qt5.6.0 (msvc2015_64) in order to make a QOpenglWidget to demonstrate a result calculated by devices using OpenCL.</p>

<p>Now I'm blind creating a context using the function "wglGetCurrentContext" and "wglGetCurrentDC", the error are:</p>

<p>"LNK2019 unresolved external symbol _imp_wglGetCurrentContext referenced in function "protected: void _cdecl VolRenGL::createCLContext(int,char const* <em>)" (?createCLContext@VolRenGL@IEAAXHPEAPEBD@Z)"
"LNK2019 unresolved external symbol _imp_wglGetCurrentDC referenced in function "protected: void _cdecl VolRenGL::createCLContext(int,char const</em> *)" (?createCLContext@VolRenGL@@IEAAXHPEAPEBD@Z)"</p>

<p>Related code:</p>

<pre><code>cl_context_properties props[] =
        {
            CL_GL_CONTEXT_KHR, (cl_context_properties)wglGetCurrentContext(),
            CL_WGL_HDC_KHR, (cl_context_properties)wglGetCurrentDC(),
            CL_CONTEXT_PLATFORM, (cl_context_properties)cpPlatform,
            0
        };
        cxGPUContext = clCreateContext(props, 1, &amp;cdDevices[uiDeviceUsed], NULL, NULL, &amp;err);
</code></pre>