Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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:

    1. I used qt-unified-linux-x64-3.2.3-online.run and selected Developer and Designer Tools.
    2. The install ran correctly. I can see qt creator is the latest version.
    3. The install brought over the 3d examples. I want to build the Qt 3D: Basic Shapes example
    4. I clicked on it and it was copied to my projects directory.
    5. I tried to build it and got an error could not find examples.pri
    6. Online I saw a suggestion to find examples.pri and copy it to my projects directory
    7. Now when I tried to build I get an error
      "Project ERROR: Unknown module(s) in QT: 3dextras 3dcore 3drender 3dinput"
    8. 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
    9. 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.

    1. I went to Synaptic Package Manger and searched for packages qt3d5
    2. It listed "qt3d5-dev", described as "Qt 5 3D development files".
    3. It showed package was NOT installed.
    4. 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.

  • Lifetime Qt Champion

    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.

    1. I installed Qt4 and QT 5 using synaptic and appt.
    2. Later when attempting to use 3D is used qt-unified-linux-x64-3.2.3-online.run
    3. qt-unified-linux-x64-3.2.3-online.run created /home/me/Qt
    4. If I click on desktop icon for Qt and select details it says version 4.5.2-3ubuntu2
    5. 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
    6. If I go to /usr/lib/x86_64-linux-gnu/qtchooser it shows 4.conf, qt4.conf, 5.conf, qt5.conf and
      default.conf.
    7. default.conf is a link to /usr/share/qtchooser/qt5-x86_64-linux-gnu.conf.
    8. 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
    9. 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
    10. However, libraries are not C++ modules. Correct?
      Where should I look to see if the installed Qt modules?
    11. 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.

    1. Figure out how to install the missing modules.
      Error "Unknown module(s) in QT: 3dextras 3dcore 3drender 3dinput"
    2. 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



  • @C-Cubed Gag!!!!!!
    Figured it out, it was amazingly simple.

    1. I went to Synaptic Package Manger and searched for packages qt3d5
    2. It listed "qt3d5-dev", described as "Qt 5 3D development files".
    3. It showed package was NOT installed.
    4. 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.

  • Lifetime Qt Champion

    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.


  • Lifetime Qt Champion

    @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


  • Lifetime Qt Champion

    @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.


Log in to reply