Solved Can't build basicshapes-cpp example
-
I'm running Ubuntu 18.04;I have Qt5 installed and I successfully built several qt applications including apps with 2d graphics.
I want to build some 3d graphics apps. I've taken the following steps:- I used qt-unified-linux-x64-3.2.3-online.run and selected Developer and Designer Tools.
- The install ran correctly. I can see qt creator is the latest version.
- The install brought over the 3d examples. I want to build the Qt 3D: Basic Shapes example
- I clicked on it and it was copied to my projects directory.
- I tried to build it and got an error could not find examples.pri
- Online I saw a suggestion to find examples.pri and copy it to my projects directory
- Now when I tried to build I get an error
"Project ERROR: Unknown module(s) in QT: 3dextras 3dcore 3drender 3dinput" - I've checked syanptics and the packages libqt53d3xtras5, libqt53dcore5,libqt53drender5 and
libqt53dinput5 are installed. They are installed in
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9.5
/usr/share/doc/libqt53dextras5
/usr/share/doc/libqt53dextras5/copyright
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9 and similar for others - I know the probem has something to do with missing libraries, library paths or kits but I can't figure it out. Its a wilderness.
Can someone help?
Also can someone point to good documentation on qt creator and associated tools so I can educate myself and navigate the wilderness of install, qmake, cmake libraries and paths.
Thanks
-
@C-Cubed Gag!!!!!!
Figured it out, it was amazingly simple.- I went to Synaptic Package Manger and searched for packages qt3d5
- It listed "qt3d5-dev", described as "Qt 5 3D development files".
- It showed package was NOT installed.
- Installed it.
Problem solved example builds an runs
This begs the question, if installing examples allows you to try and build the example, why
is qt3d5-dev not listed as a dependency and installed along with it.
-
Hi and welcome to devnet,
You seem to be mixing your distribution provided Qt with the one you installed with the online installer. Which one are you using currently ?
If the one from your distribution, you did not install the development packages required.
-
@SGaist I'm sure your correct. Some additional information and some questions.
- I installed Qt4 and QT 5 using synaptic and appt.
- Later when attempting to use 3D is used qt-unified-linux-x64-3.2.3-online.run
- qt-unified-linux-x64-3.2.3-online.run created /home/me/Qt
- If I click on desktop icon for Qt and select details it says version 4.5.2-3ubuntu2
- If I run Qt creator by clicking on the icon and go to Help about Qt Creator it says version 4.13.0
based on Based on Qt 5.15.0 - If I go to /usr/lib/x86_64-linux-gnu/qtchooser it shows 4.conf, qt4.conf, 5.conf, qt5.conf and
default.conf. - default.conf is a link to /usr/share/qtchooser/qt5-x86_64-linux-gnu.conf.
- qt5-x86_64-linux-gnu.conf contains:
/usr/lib/qt5/bin
/usr/lib/x86_64-linux-gnu
I assume that's what Qt creator is using - I can see the libraries I would expect:
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5 - However, libraries are not C++ modules. Correct?
Where should I look to see if the installed Qt modules? - I tried running MaintenanceTool in /home/me/Qt Add or Remove Components.
a) It says I've installed "Developer and Designer Tools 1.0.8-1
b) It lists a number of Qt distributions. None are marked installed and none
explicitly lists the modules I'm looking for.
c) Distribution 5.15.1 lists a module Qt Quick 3D.
Should I try adding 5.15.1 and Qt Quick 3D?
I don't think that will install 3dextras 3dcore 3drender 3dinput. I think it might install
"quick" versions whatever they are.
Thank you for your time and help.
-
@SGaist Thinking this through. It looks like there are two paths to a solution.
- Figure out how to install the missing modules.
Error "Unknown module(s) in QT: 3dextras 3dcore 3drender 3dinput" - Convert the sample program to using libraries and explicit calls.
However I can't try tactic 2 without header files.
Back to square 1. The 5.9 and 5.9.5 installations have the libraries. I can see them.
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5
/usr/lib/x86_64-linux-gnu/libQt53DRender.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5
/usr/lib/x86_64-linux-gnu/libQt53DExtras.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DCore.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5.9.5
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5.9
/usr/lib/x86_64-linux-gnu/libQt53DInput.so.5
But they don't have the header files. Where can I get them?
So I just want to be able to build and run the example
Qt 3D: Basic shapes - Figure out how to install the missing modules.
-
@C-Cubed Gag!!!!!!
Figured it out, it was amazingly simple.- I went to Synaptic Package Manger and searched for packages qt3d5
- It listed "qt3d5-dev", described as "Qt 5 3D development files".
- It showed package was NOT installed.
- Installed it.
Problem solved example builds an runs
This begs the question, if installing examples allows you to try and build the example, why
is qt3d5-dev not listed as a dependency and installed along with it.
-
Did you install the examples using synaptic ?
-
Yes I installed examples using synaptic. When I ran qt-unified-linux-x64-3.2.3-online.run. It didn't install the examples. Apparently the only thing it installed was a new version of Qt creator.
Not nice. -
@C-Cubed said in Can't build basicshapes-cpp example:
Apparently the only thing it installed was a new version of Qt creator.
Appearently because you only selected the "Tools", but no Qt version.
Regards
-
@C-Cubed said in Can't build basicshapes-cpp example:
Problem solved example builds an runs
This begs the question, if installing examples allows you to try and build the example, why
is qt3d5-dev not listed as a dependency and installed along with it.That's a question for your distribution's Qt 3D examples package maintainers.