Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt 5.14 New Installation ~ Error



  • Installed 5.14 on OSx 10.15.2. Pre-installed XCode and Android Studio. Downloaded NDK 21...

    Opened old project from 5.13 and tried to compile... getting errors. New project (or an example does not create errors):

    ../../src/dload.cpp:73: error: undefined reference to 'operator new(unsigned int)'
    ../../src/dload.cpp:73: error: undefined reference to 'operator delete(void*)'
    ../../src/dload.cpp:83: error: undefined reference to 'operator new(unsigned int)'
    ../../src/dload.cpp:83: error: undefined reference to 'operator delete(void*)'
    armeabi-v7a/dload.o(.ARM.extab+0x0): error: undefined reference to '__gxx_personality_v0'
    armeabi-v7a/dload.o(.ARM.extab+0xdc): error: undefined reference to '__gxx_personality_v0'
    armeabi-v7a/dload.o(.ARM.extab+0x164): error: undefined reference to '__gxx_personality_v0'
    armeabi-v7a/dload.o(.ARM.extab.text._ZN16BurgeeDownloader13setMyFilePathERK7QString+0x0): error: undefined reference to '__gxx_personality_v0'
    armeabi-v7a/main.o:main.cpp:function __clang_call_terminate: error: undefined reference to '__cxa_begin_catch'
    armeabi-v7a/main.o:main.cpp:function __clang_call_terminate: error: undefined reference to 'std::terminate()'
    ../../src/functions.h:425: error: undefined reference to 'operator new(unsigned int)'
    ../../src/functions.h:427: error: undefined reference to 'operator new(unsigned int)'
    ../../src/functions.h:425: error: undefined reference to 'operator delete(void*)'
    ../../src/functions.h:427: error: undefined reference to 'operator delete(void*)'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:683: error: undefined reference to '__cxa_begin_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:685: error: undefined reference to '__cxa_rethrow'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:686: error: undefined reference to '__cxa_end_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:701: error: undefined reference to '__cxa_begin_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:703: error: undefined reference to '__cxa_rethrow'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:704: error: undefined reference to '__cxa_end_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:615: error: undefined reference to '__cxa_begin_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:617: error: undefined reference to '__cxa_rethrow'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:618: error: undefined reference to '__cxa_end_catch'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:635: error: undefined reference to '__cxa_rethrow'
    /Users/owner/Qt/5.14.0/5.14.0/android/include/QtCore/qlist.h:636: error: undefined reference to '__cxa_end_catch'
    armeabi-v7a/qmlcache_loader.cpp:260: error: undefined reference to '__cxa_guard_acquire'
    armeabi-v7a/qmlcache_loader.cpp:260: error: undefined reference to '__cxa_guard_release'
    armeabi-v7a/qmlcache_loader.cpp:260: error: undefined reference to '__cxa_guard_abort'
    armeabi-v7a/moc_functions.o:moc_functions.cpp:typeinfo for Functionsqt: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
    /Users/owner/Qt/Android/ndk_r21/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
    armeabi-v7a/moc_dload.o:moc_dload.cpp:typeinfo for BurgeeDownloader: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
    /Users/owner/Qt/Android/ndk_r21/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [Makefile:323: libbtstwx_armeabi-v7a.so] Error 1
    21:12:34: The process "/Users/owner/Qt/Android/ndk_r21/prebuilt/darwin-x86_64/bin/make" exited with code 2.
    Error while building/deploying project btstWx_brand_n (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.0 for Android))
    When executing step "Make"
    21:12:34: Elapsed time: 00:47.

    Any ideas?



  • Hi @BTSTOnline,

    Add this to your pro file:

    QMAKE_LFLAGS += -lstdc++

    It works fine with me :)


  • Lifetime Qt Champion

    @BTSTOnline Try to do a clean rebuild:

    • Delete build directory
    • Run qmake
    • Rebuild

Log in to reply