Error installing Qt3D with QtCreator and qt5



  • I tried to install Qt3D using QtCreator 5.1.1 on Windows 8, and I can't figure out how to succeed.

    First, I followed the steps given in the documentation:

    • get the sources on git://gitorious.org/qt/qt3d
    • open the .pro in QtCreator
    • add the "install" and "-j 3" arguments to the make command

    When I build the project, I get the following error:
    @
    In file included from D:\qt3D\project\qt-qt3d\src\threed\global\qglnamespace.cpp:42:0:
    D:\qt3D\project\qt-qt3d\src\threed\global\qglnamespace.h:45:29: fatal error: Qt3D/qt3dglobal.h: No such file or directory
    #include <Qt3D/qt3dglobal.h>
    ^
    compilation terminated.
    Makefile.Debug:2547: recipe for target '.obj/debug_shared/qglnamespace.o' failed
    mingw32-make[3]: *** [.obj/debug_shared/qglnamespace.o] Error 1
    mingw32-make[3]: Leaving directory 'D:/qt3D/project/release/src/threed'
    Makefile:38: recipe for target 'debug-all' failed
    mingw32-make[2]: Leaving directory 'D:/qt3D/project/release/src/threed'
    Makefile:40: recipe for target 'sub-threed-make_first-ordered' failed
    mingw32-make[1]: Leaving directory 'D:/qt3D/project/release/src'
    makefile:43: recipe for target 'sub-src-make_first' failed
    mingw32-make[2]: *** [debug-all] Error 2
    mingw32-make[1]: *** [sub-threed-make_first-ordered] Error 2
    mingw32-make: *** [sub-src-make_first] Error 2
    15:07:03: Le processus "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" s'est terminé avec le code 2.
    Erreur lors de la compilation/déploiement du projet qt3d (kit : Desktop Qt 5.1.1 MinGW 32bit)
    Lors de l'exécution de l'étape "Make"
    @

    So I created the following folders into the folder "C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include":

    • Qt3D: I copied there all .h files located into subfolders of the src/threed folder of the qt3d sources
    • Qt3DQuick: I copied there all .h files located into the src/quick3d folder of the qt3d sources

    I re-run the compilation, and then I got the following errors:
    @
    D:\qt3D\project\qt-qt3d\src\quick3d\qquickeffect.cpp:44:24: fatal error: qglpainter.h: No such file or directory
    #include "qglpainter.h"
    ^
    compilation terminated.
    Makefile.Release:810: recipe for target '.obj/release_shared/qquickeffect.o' failed
    mingw32-make[3]: *** [.obj/release_shared/qquickeffect.o] Error 1
    mingw32-make[3]: *** Waiting for unfinished jobs....
    D:\qt3D\project\qt-qt3d\src\quick3d\qquickitem3d.cpp:47:32: fatal error: qgllightparameters.h: No such file or directory
    #include "qgllightparameters.h"
    ^
    compilation terminated.
    D:\qt3D\project\qt-qt3d\src\quick3d\qquickmesh.cpp:44:30: fatal error: qglabstractscene.h: No such file or directory
    #include "qglabstractscene.h"
    ^
    compilation terminated.
    Makefile.Release:949: recipe for target '.obj/release_shared/qquickitem3d.o' failed
    mingw32-make[3]: *** [.obj/release_shared/qquickitem3d.o] Error 1
    Makefile.Release:1053: recipe for target '.obj/release_shared/qquickmesh.o' failed
    mingw32-make[3]: *** [.obj/release_shared/qquickmesh.o] Error 1
    mingw32-make[3]: Leaving directory 'D:/qt3D/project/release/src/quick3d'
    mingw32-make[2]: *** [release-install] Error 2
    Makefile:58: recipe for target 'release-install' failed
    mingw32-make[2]: Leaving directory 'D:/qt3D/project/release/src/quick3d'
    Makefile:107: recipe for target 'sub-quick3d-install_subtargets-ordered' failed
    mingw32-make[1]: Leaving directory 'D:/qt3D/project/release/src'
    mingw32-make[1]: *** [sub-quick3d-install_subtargets-ordered] Error 2
    makefile:55: recipe for target 'sub-src-install_subtargets' failed
    mingw32-make: *** [sub-src-install_subtargets] Error 2
    15:18:09: Le processus "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" s'est terminé avec le code 2.
    Erreur lors de la compilation/déploiement du projet qt3d (kit : Desktop Qt 5.1.1 MinGW 32bit)
    Lors de l'exécution de l'étape "Make"
    @

    So, I tried to copy all needed .h file into sources folders where they are needed, but I didn't work. Moreover, I think there must be another way to get what I want, but I can't see how.

    I someone could help me, I would be glad.

    Thanks,

    Lauriane



  • Hi Lauriane,

    I have the same problem with installing QT3D in win32 QT 5.2.1.

    First of all: there is some error in the project files of QT3D, so you should NOT change your regular QT installation if that's working fine. So don't copy *.h files to mingw48_32 folders.

    Just unzip the qt3d installation and

    1. Copy that folder (yes, 2x on disk)
    2. mess around in one of them and
    3. throw that away if your changes don't work. Go to 1 until it works.

    Look at my error below, mingw32-make can't find the include file 'qt3dglobal.h' in folder Qt3D -> which is correct as it is in folder global, so this will never work. I'm new to QT so I don't know what is the right thing to do. Maybe just remove the 'Qt3D/' from #include <Qt3D/qt3dglobal.h>???

    This probably means all includes of Qt3D won't work (checking this now...)
    I'll get back here when I know what to do with this....
    Cheers,
    Rene

    _In file included from global/qglnamespace.cpp:42:0:
    global/qglnamespace.h:45:29: fatal error: Qt3D/qt3dglobal.h: No such file or directory
    #include <Qt3D/qt3dglobal.h>
    ^
    compilation terminated.
    Makefile.Release:2557: recipe for target '.obj/release/qglnamespace.o' failed
    mingw32-make[3]: Leaving directory 'D:/Qt/qt3d/src/threed'
    Makefile:38: recipe for target 'release-all' failed
    mingw32-make[2]: Leaving directory 'D:/Qt/qt3d/src/threed'
    mingw32-make[3]: *** [.obj/release/qglnamespace.o] Error 1
    Makefile:40: recipe for target 'sub-threed-make_first-ordered' failed
    mingw32-make[1]: Leaving directory 'D:/Qt/qt3d/src'
    makefile:43: recipe for target 'sub-src-make_first' failed
    mingw32-make[2]: *** [release-all] Error 2
    mingw32-make[1]: *** [sub-threed-make_first-ordered] Error 2
    mingw32-make: *** [sub-src-make_first] Error 2
    03:43:50: The process "D:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project qt3d (kit: Desktop Qt 5.2.1 MinGW 32bit)
    When executing step 'Make'
    _



  • Hi Lauriane,

    I replaced "#include <Qt3D/" with "#include <" in all ".h" files of project qt3d.pro and so far mingw32-make keeps running (not finished yet, though).

    Rene



  • Hi Rene,

    Thanks for your reply :)
    I uninstalled Qt 5.1.1 and re-installed it, in order to discard all the changes I hade made in the configuration.
    I followed what is written on "this post":http://stackoverflow.com/questions/15297870/how-to-install-qt3d-on-qt5?rq=1
    They say that the downloading from git must be done using a git client. So I downloaded the git project with git, and run
    @qmake
    mingw32-make.exe@

    Everything went fine, but I still cannot use Qt3D on my project.
    I copied all files into C:/Qt5.1.1/5.1.1/mingw48-32 (the .dll into bin/, include and qml folders into include/ and qml/)

    I created a new QtQuick 2 project with QtCreator, at the beginning of my main.qml file, I wrote
    @import QtQuick 2.0
    import Qt3D 1.0
    import Qt3D.Shapes 1.0@
    But if I run it I get the errors:
    @module "Qt3D" is not installed
    import Qt3D 1.0
    ^@
    @module "Qt3D.Shapes" is not installed
    import Qt3D.Shapes 1.0
    ^@

    On this page of "qt documentation":http://doc-snapshot.qt-project.org/qt3d-1.0/qt3d-troubleshooting.html , it seems that the "qmldir" file is missing from the qml/Qt3D folder. But the documentation applies to Qt 4.7.3... I tried to create one, but I get more errors.

    Keeping searching...

    Lauriane



  • Hi Lauriane,

    • Just to get things clear, you did also install ActivePerl, Python, Ruby, etc (and optional webkit stuff) as suggested via StackOverflow? ANGLE too?

    Seems a lot of extra stuff to do OpenGL (and I truly hate multi, multi language development. Add Java for Android, objective-c for osx, VB for Excel and Access and your head will spin).

    • Some Digia "official" said (in jan 2013) Qt3D should be part of Qt 5.2 but didn't make it. (I rechecked my Qt 5.2.1and it is still NOT included, duh, I knew that)

    I'm following your lead now...



  • At last, I succeeded!
    So,

    • first I downloaded the latest version of Qt, Qt 5.2.1
    • I downloaded the sources of Qt3D from the git repository with a git client into the folder "C:\qt3d"
    • with the terminal "Qt 5.2.1 for Desktop (MinGW 4.8 32 bit)"
      @cd C:\qt3D
      qmake
      mingw32-make.exe install@
      the "install" is important so that all files are copied into Qt configuration folder.

    Then, in the .pro file, add
    @QT += 3d@

    And in main.qml file:
    @import QtQuick 2.0
    import Qt3D 2.0
    import Qt3D.Shapes 2.0@

    Lauriane



  • Hi Rene,
    I had to install ActivePerl, indeed. I forgot to mention it, sorry. However, I didn't need to install the others (Python, Ruby or ANGLE)
    Good luck,
    Lauriane



  • Hi

    You beat me to it, cudo's!! Running it now.
    Would be nice if you made the above in a final document and send it to the Qt3D developers. I bet there are much more NOOBS like us wanting to use it. And now they also know it installs in Qt 5.2.1 running on W7-x86 and W8.1-x86(?)

    Thanks a lot!

    P.S.: I changed the Qtenv.bat and rem'ed the PATH and added the folders to my regular PATH environment in Windows system settings, making the "MingW32 Terminal" obsolete (any DOS box will work now)



  • Thanks Rene & Lauriane, i finally could build Qt3d ! :)



  • Hello lauriane,

    i know its quite a while since you were active in this post but can you explain to me what you mean by "with the terminal "Qt 5.2.1 for Desktop (MinGW 4.8 32 bit)""? I don't know where to write these commands.

    Eduard


  • Moderators

    Hi @eduard9119,

    You might want to consider installing the official Qt 5.5.0 beta: http://download.qt.io/snapshots/qt/5.5/5.5.0-beta/

    It includes Qt 3D as a tech preview. No need to build it yourself.



  • Hi JKSH,
    first i want to thank you for your fast response.
    According to your advice tried the QT 5.5 beta but "import Qt3D 2.0" is red underlined and if i want to build the qt3d examples just black windows appear. Do you know the cause of this problem? Did i miss to set up some settings here?


  • Moderators

    @eduard9119 said:

    According to your advice tried the QT 5.5 beta but "import Qt3D 2.0" is red underlined

    1. What platform are you using?
    2. What compiler are you using?

    and if i want to build the qt3d examples just black windows appear.

    1. What graphics card do you have?
    2. Are your graphics drivers up to date?


  • Ok most of the examples work now.
    I'm currently trying to programm an object loader myself.
    I'm working on a Windows 8.1 64Bit System with MSVC2013. Moreover I've got a NVIDIA GeForce GTX 850M with the latest drivers installed.
    I can use 3d objects in my programm but i can't load those for now. But i think it's a lack of my understanding in 3d programming and qt3d. I don't think it's a big problem.
    Thank you for you help here!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.