derpicated / articated

ARticated; An augmented reality application for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't link against GLESv3 for the Android and GL for desktop build.

idelsink opened this issue · comments

Remove the linking against the GLESv3 and GL target. Qt loads these libraries on runtime.

Change:

if(ANDROID)
    target_link_libraries( augmentation operators ${QT_LIBRARIES} GLESv3 )
else()
    target_link_libraries( augmentation operators ${QT_LIBRARIES} GL )
endif()

To:

if(ANDROID)
    target_link_libraries( augmentation operators ${QT_LIBRARIES} )
else()
    target_link_libraries( augmentation operators ${QT_LIBRARIES} )
endif()

Actually, the desktop build should not link against GL either.
The QT libraries resolve the OpenGL libraries at runtime, which it then also uses to draw the UI elements

Updated my comments and added a new board for progress tracking. (https://github.com/derpicated/articated/projects/6)

When not linking to GLESv3 for Android, I get the following linker errors.

[ 85%] Linking CXX shared library libarticated_app.so                                    
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1309: error: undefined reference to 'glDeleteBuffers'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1128: error: undefined reference to 'glBindBuffer'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1207: error: undefined reference to 'glBufferData'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1452: error: undefined reference to 'glGenFramebuffers'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:848: error: undefined reference to 'glGetIntegerv'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1141: error: undefined reference to 'glBindFramebuffer'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1419: error: undefined reference to 'glFramebufferTexture2D'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:961: error: undefined reference to 'glReadPixels'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:595: error: undefined reference to 'glBindTexture'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1016: error: undefined reference to 'glTexImage2D'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:628: error: undefined reference to 'glClearColor'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:760: error: undefined reference to 'glEnable'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:804: error: undefined reference to 'glGenTextures'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1027: error: undefined reference to 'glTexParameterf'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1430: error: undefined reference to 'glGenBuffers'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:2163: error: undefined reference to 'glVertexAttribPointer'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1397: error: undefined reference to 'glEnableVertexAttribArray'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1095: error: undefined reference to 'glActiveTexture'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1866: error: undefined reference to 'glUniform1i'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:1082: error: undefined reference to 'glViewport'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:617: error: undefined reference to 'glClear'
/home/ingmar/Qt/5.10.1/android_armv7/include/QtGui/qopenglfunctions.h:738: error: undefined reference to 'glDrawArrays'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)        
make[2]: *** [source/CMakeFiles/articated_app.dir/build.make:194: source/libarticated_app.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: source/CMakeFiles/articated_app.dir/all] Error 2 
make: *** [Makefile:84: all] Error 2

This happened after I "fixed" the build process as described in #21 (comment)

Android will still link to GLESv3, closing this issue.