undefined reference to `qt_version_tag@Qt_5.13'

  • Hi,

    I'm trying to embed Qt as an external library of our application, as we do for other libraries like boost, opencv, ... I'll spare your the details but we have our own way to package our application, for externals too and we cannot use or, then, first I tried building Qt from source (as we did on our old OS with Qt 4.7.4) but does not work because cannot found the way to build libQt5WebEngine that we need, the way I found was to install Qt with run file (currently in /tmp/Qt5 then do a package of this suitable for our external (especially include and lib folders must be in archive root), but, when trying to build our application after deployment of Qt there is following error:

    [  8%] Linking CXX executable ../../../bin/Debug/app
    /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: ../../../../External/Vendors/qt/lib/ undefined reference to `qt_version_tag@Qt_5.13'
    collect2: error: ld returned 1 exit status
    distcc[15704] ERROR: compile (null) on localhost failed

    From what I found on the internet some people fixed this error defining QT_NO_VERSION_TAGGING, in our case with add_definitions(-DQT_NO_VERSION_TAGGING) for CMake in CMakeListsCommon.cmake, but this was without success.

    I also found qt_version_tag@... should be defined in (for Qt v5.13.2), there are actually several qt_version_tag@<minor.major> defined in this library (looked with nm <file> command) but for Qt_5.13 it is defined with two @ (00000000003a8380 R qt_version_tag@@Qt_5.13) but not sure this is an issue (it may just be to point out the current version) since in we can see it as undefined with two @ too (U qt_version_tag@@Qt_5.13).

    For information, we also have Qt 5.9.4 installed on the system, it is needed for applications using Qt installed by the OS, but it seems not to interfere, performing a ldd on for which undefined reference is raised shows it actually links with the proper (5.13.2):

    	[...] => /path/to/workspace/lib/external/ (0x00007fb7c7948000)
    linux:/path/to/workspace/lib/external>ll ->

    Anyone knows what can be the issue and how can I fix this ?


Log in to reply