Qt link errors [undefined reference to `QThread::wait(QDeadline Time)@qt_5']
-
We have application source-code & supporting libraries build on RHEL 7.6 & gcc 4.8.5 Qt5.15.2.
We want to replicate the same condition and continue to enhance features upon the source code.
We are not able to complete the build and following errors are shown.
on RHEL 7.6, we see errors like
undefined reference to `QThread::wait(QDeadline Time)@qt_5'undefined reference to
QPushButton::hitButton(QPoint const &) const@Qt_5' undefined reference totypeindo for DIRECT_RENDER::....I see that QPushbutton::hitbuttom is defined as part libQt5Widget.so and QThread as part of Core, still I see the link errors.
I have built Qt5.15.14 from https://wiki.qt.io/Building_Qt_5_from_Git, and install Qt.5.12.12 QTCreator from https://download.qt.io/archive/qt/5.12/5.12.12/qt-opensource-linux-x64-5.12.12.run
we haven't taken Qt License as of now, we want to make sure that we are able to build before taking license.
My .pro is like
TEMPLATE = app
TARGET = ../bin/DesktopApp
DEFINES += TOKEN
CONFIG += $$DEFINES
CONFIG += c++14 warn_offQT += core gui sql network xml positioning opengl concurrent
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_NO_VERSION_TAGGINGI tried to include libstdc++
LIBS += -lstdc++.I have tried soft/hard links to libraries from /opt/Qt5.15.14/5.15.14/gcc_64/lib/libQt5Core*.so to /usr/lib64/libQt5Core*.so and still the link error persists
Really looking for some help on this to solve the problem asap.
Thanks
Arun -
We have application source-code & supporting libraries build on RHEL 7.6 & gcc 4.8.5 Qt5.15.2.
We want to replicate the same condition and continue to enhance features upon the source code.
We are not able to complete the build and following errors are shown.
on RHEL 7.6, we see errors like
undefined reference to `QThread::wait(QDeadline Time)@qt_5'undefined reference to
QPushButton::hitButton(QPoint const &) const@Qt_5' undefined reference totypeindo for DIRECT_RENDER::....I see that QPushbutton::hitbuttom is defined as part libQt5Widget.so and QThread as part of Core, still I see the link errors.
I have built Qt5.15.14 from https://wiki.qt.io/Building_Qt_5_from_Git, and install Qt.5.12.12 QTCreator from https://download.qt.io/archive/qt/5.12/5.12.12/qt-opensource-linux-x64-5.12.12.run
we haven't taken Qt License as of now, we want to make sure that we are able to build before taking license.
My .pro is like
TEMPLATE = app
TARGET = ../bin/DesktopApp
DEFINES += TOKEN
CONFIG += $$DEFINES
CONFIG += c++14 warn_offQT += core gui sql network xml positioning opengl concurrent
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_NO_VERSION_TAGGINGI tried to include libstdc++
LIBS += -lstdc++.I have tried soft/hard links to libraries from /opt/Qt5.15.14/5.15.14/gcc_64/lib/libQt5Core*.so to /usr/lib64/libQt5Core*.so and still the link error persists
Really looking for some help on this to solve the problem asap.
Thanks
Arun@Arun-Ayachith Please show the linker calls which causes these errors.
-
Hi and welcome to devnet,
That overload of QThead::wait is only available since 5.15 so you can forget about 5.12.
You should not try to replace your system's Qt with your self-built version, you might just break your installation.
Did you ensure that you are using the proper qmake executable when using your custom build ?