Why is osgEarth not building with Qt on macOs?

classic Classic list List threaded Threaded
3 messages Options
garbart garbart
Reply | Threaded
Open this post in threaded view
|

Why is osgEarth not building with Qt on macOs?

Hey everyone! I'm trying to build osgEarth with Qt. Instructions on the official website reads:

Point the QT_QMAKE_EXECUTABLE CMake variable to the qmake.exe you want to use and CMake will populate all the other QT variables.

Good. I do the following:

cmake -D QT_QMAKE_EXECUTABLE=/Users/garbart/Qt/5.10.0/clang_64/bin/qmake CMakeLists.txt
make


And get the following error:

[ 19%] Built target osgEarth
[ 25%] Built target osgEarthSymbology
[ 32%] Built target osgEarthFeatures
[ 35%] Built target osgEarthAnnotation
[ 44%] Built target osgEarthUtil
[ 44%] Building CXX object src/osgEarthQt/CMakeFiles/osgEarthQt5.dir/ViewerWidget.cpp.o
In file included from /Users/garbart/Desktop/osgearth-master/src/osgEarthQt/ViewerWidget.cpp:31:
In file included from /Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/QtGui:45:
In file included from /Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/qopenglcontext.h:61:
/Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/qopenglversionfunctions.h:1089:23: error:
      unknown type name 'GLDEBUGPROC'
    QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);
                      ^
In file included from /Users/garbart/Desktop/osgearth-master/src/osgEarthQt/ViewerWidget.cpp:31:
In file included from /Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/QtGui:47:
/Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/qopenglextrafunctions.h:472:33: error:
      unknown type name 'GLDEBUGPROC'
    void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
                                ^
/Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/qopenglextrafunctions.h:758:23: error:
      unknown type name 'GLDEBUGPROC'
    QT_OPENGL_DECLARE(QT_OPENGL_EXTRA_FUNCTIONS)
                      ^
/Users/garbart/Qt/5.10.0/clang_64/lib/QtGui.framework/Headers/qopenglextrafunctions.h:2213:59: error:
      unknown type name 'GLDEBUGPROC'
inline void QOpenGLExtraFunctions::glDebugMessageCallback(GLDEBUGPROC ca...
                                                          ^
4 errors generated.
make[2]: *** [src/osgEarthQt/CMakeFiles/osgEarthQt5.dir/ViewerWidget.cpp.o] Error 1
make[1]: *** [src/osgEarthQt/CMakeFiles/osgEarthQt5.dir/all] Error 2
make: *** [all] Error 2


QT 5.10.0 osgEarth 2.10

What it could be?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Why is osgEarth not building with Qt on macOs?

Garbart,
You're the first person I'm heard of trying to use Qt 5.10 with OSG/osgEarth, so this is new ground. I don't have an answer, but GLDEBUGPROC is a typedef found in the GL header glext.h so I suggest starting your research there. Maybe you just need an updated driver -- maybe there's a missing include somewhere. Good luck.
Glenn Waldron / Pelican Mapping
garbart garbart
Reply | Threaded
Open this post in threaded view
|

Re: Why is osgEarth not building with Qt on macOs?

I found a solution. All you needed was to add a line
typedef void (GL_APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); 
into the files
/Qt/5.10.1/clang_64/lib/QtGui.framework/Headers/qopenglversionfunctions.h
 and
/Qt/5.10.1/clang_64/lib/QtGui.framework/Headers/qopenglextrafunctions.h.