Search code examples
cmacosopenglglut

Unresolved external typedef while compiling with X11


I'm compiling an app using quake qgl api on X11/FreeGLUT (OSX 10.12) Compilation fails with errors like this:

/ref_gl/qgl.h:579:8: error: unknown type name     'PFNGLTEXIMAGE3DEXTPROC'; 
did you mean 'PFNGLXBINDTEXIMAGEEXTPROC'?
extern PFNGLTEXIMAGE3DEXTPROC             glTexImage3DEXT;

Seems that external typedefs ( PFNGLPNTRIANGLESIATIPROC, PFNGLPNTRIANGLESFATIPROC, PFNGLTEXIMAGE3DEXTPROC ...) couldn't be found by the compiler.

UPD: Instructions I'm following: sourceforge. net/projects/quake2xp/files/linux%20release/

Please, any suggestions ?


Solution

  • Solved: use only X11 GL library for this project. The error was caused because of mixing OpenGL prefixes in the #import directives:

    #include <OpenGL/... > (Native MacOS)  and  #include <GL/...> (X11)
    

    Only

    #include <GL/...>
    

    prefix should be used.