Unsolved Cannot build Qt Charts
-
I've never been able to build Qt Charts against Qt 5.6 (neither the beta, nor RC, nor release). The build always fails with the following error:
.obj/chartdataset.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag' .obj/chartpresenter.o: In function `QtCharts::ChartPresenter::truncatedText(QFont const&, QString const&, double, double, double, QRectF&)': chartpresenter.cpp:(.text+0x1f84): undefined reference to `QString::operator=(QLatin1String)'
Note that I am building with a version of Qt not in PATH, by configuring with the full path to the Qt 5.6 qmake. Can someone give me some idea what to do about this? Thanks.
-
Hi and welcome to devnet,
Where did you get the module from ? What OS are you using ?
-
I encountered this error too
undefined reference to `qt_version_tag'
When compiling a project in Qt 5.6.0 . that project also uses OpenCV.
I use arch linux -
You should check if OpenCV has been built with Qt for the GUI. In that case you should use the version of Qt.
-
@SGaist OpenCV is installed with arch package manager
pacman
-
And Qt ?
-
-
Well I'd say no it's not.
You are trying to build an application with Qt 5.6 and link to an OpenCV that itself is linked to a Qt 5.5.1 version.
-
@SGaist Excuse me, I did not understand what you said :D
Do you mean OpenCV needs Qt? -
One of the GUI backend of OpenCV is using Qt.
-
@SGaist I get the same issue regardless of which branch I use from either of these two repositories:
- https://github.com/qtproject/qtcharts/
- git://code.qt.io/qt/qtcharts.git
This is on Arch Linux, which currently packages Qt 5.5.1 (I can build against that just fine), with issues when I build against Qt 5.6 from qt.io. There's no OpenCV in my environment. :)
-
I note that Arch Linux has just updated their packages to Qt 5.6.0, and now I can build Qt Charts against either the system packages or the copy installed with the qt.io installer. This suggests to me that using /path/to/non/system/qmake to configure Qt Charts does not completely ignore the copy of Qt in PATH, but does some things using system Qt and other things using the explicitly selected Qt.
My problem is now gone, but for future reference, should I do something else to build a project against a copy of Qt which is not in PATH rather than the one in PATH?
-
You should only need to call qmake with the full path given.