I tried adding Qt6Gui and Qt6Core, and all kinds of reordering, but to no avail. I have no problem using Qt Charts, so the issue must be related to Qwt.
I tried adding Qt6Gui and Qt6Core, and all kinds of reordering, but to no avail. I have no problem using Qt Charts, so the issue must be related to Qwt.
Are you sure you are building qwt against your Qt6 installation? Can you successfully use qwt in a project built with QtCreator? (I know these are "Have you checked to see if it is plugged in?" questions, but I've done things like this in the past, where I have had mismatched builds and nothing seems to work).
It is MOC that results in all of the QMetaType references so something could be wrong with your qwt build.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
I am not absolutely sure I am building Qwt corectly. I built Qwt thus:
/usr/bin/qmake qwt.pro
make
sudo make install
The strange thing is that all the examples supplied with Qwt works perfectly when build by QtCreator.
The file qwtconfig.pri starts of with:
QWT_VER_MAJ = 6
QWT_VER_MIN = 2
QWT_VER_PAT = 0
QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT}
which looks correct to me.
I do not know if it is relevant, but qwt.pro has this information at the start:
lessThan(QT_MAJOR_VERSION, 5) {
lessThan(QT_MINOR_VERSION, 8) {
error(Qt >= 4.8 required.)
}
}
include( qwtconfig.pri )
The version 5 here probably refers to Qt 5.15.3 used by Kubuntu 22.04?
qmake --version
returns
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
I noticed that there is also qmake6, which returns:
qmake6 --version
QMake version 3.1
Using Qt version 6.2.4 in /usr/lib/x86_64-linux-gnu
So I tried:
make clean
/usr/bin/qmake6 qwt.pro
make
sudo make install
but the problem persists.
What do you see when you run this?
Does it show dependencies on any of the Qt6 libraries?
How about opening the qwt.pro file in QtCreator and ensuring that you are building using a Qt6 kit?
I am afraid I am not really a linux developer, so this is getting to the limits of my knowledge and experience.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
I see:
QQt Code:
ldd: ./libqwt.so: No such file or directoryTo copy to clipboard, switch view to plain text mode
I then created a link:
but it made no difference. But output likeQt Code:
ln -s /usr/local/qwt-6.2.0/lib/libqwt.so.6.2.0 libqwt.soTo copy to clipboard, switch view to plain text mode
indicated that the lib is found. It also indicates that qwt v. 6.2.0 is used, as well as Qt6, so it appears that there isn't a version mismatch. Also, I can build the qwt examples with Qt Creator, so libqwt.so seems to be OK.Qt Code:
/usr/bin/ld: /usr/local/qwt-6.2.0/lib/libqwt.so: undefined reference to `QtPrivate::QMetaTypeInterfaceWrapper<QVariant>::metaType@Qt_6'To copy to clipboard, switch view to plain text mode
Well. sorry, but I am at the end of my ideas. I think qmake creates a Makefile, right? (I use Visual Studio on Windows for all my development, which does not use Makefiles). Maybe take a look at one of those for your qwt examples and see if there is something in the linking that is missing from your CMakelists file. Otherwise, I don't know what else to suggest.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Yes, cmake creates a makefile, but I don't find any clues there. There is a file called CMakeCache.txt, which includes:
which is the correct path. Anyway, don't spend more time on this problem. I will keep scratching my head though. One thing I haven't thought about before: does qmake use hard-coded paths?Qt Code:
Name Value QWT /usr/local/qwt-6.2.0/lib/libqwt.soTo copy to clipboard, switch view to plain text mode
No, I meant qmake. Check the Makefile from that to see if there are any ideas about what could be wrong with the cmake configuration.cmake creates a makefile
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks