[cairo] Bug when building cairo-gl with VS2013 on win10.

Zou Wei tmp111 at yeah.net
Fri Oct 14 17:23:56 UTC 2016


I tried to build cairo with OpenGL—not EGL or GLES2—support with Visual Studio 2013 on Windows 10 but finally got stuck.
The error log:
    1>cairo-gl-composite.obj : error LNK2019: unresolved external symbol _glActiveTexture at 4 referenced in function __cairo_gl_context_setup_operand
    1>cairo-gl-device.obj : error LNK2001: unresolved external symbol _glActiveTexture at 4
    1>cairo-gl-glyphs.obj : error LNK2001: unresolved external symbol _glActiveTexture at 4
    1>cairo-gl-composite.obj : error LNK2019: unresolved external symbol _glBlendFuncSeparate at 16 referenced in function __cairo_gl_set_operator


It seems that `glActiveTexture` and `glBlendFuncSeparate` are not in the opengl32.lib(opengl32.dll), although they are defined in glext.h ( just downloaded it from https://www.opengl.org/registry/api/GL/glext.h ).


According to this post ( https://devtalk.nvidia.com/default/topic/911348/opengl/where-opengl-2-1-located-in-the-driver-package/post/4784110/#4784110  ), the opngl32.dll only contains Microsoft's software OpenGL 1.1 implementation.  And `glActiveTexture` is a function in OpenGL 1.3 and `glBlendFuncSeparate` is a function in OpenGL 1.4. So they are not in the dll. ***That's the problem.*** I think this is a bug of the openGL backend on windows.


My approach is to add the glew (https://github.com/nigels-com/glew/) to cairo. Then the compilation is succeeded in VS2013. I will try the compiled cairo dll tomorrow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20161015/01932341/attachment.html>


More information about the cairo mailing list