How to install QT3d on QT5?
Asked Answered
R

4

6

I am trying to install Qt3d on Qt5. When I install QT5, in the installation folder there is a src folder. In this folder, the qt3d library is present.

If I understand correct, I must build it in order to use the various header files.

But I wanted the latest source. So in order to download the source of qt3d to build with QT5 I click on master on this https://qt.gitorious.org/qt/qt3d then i download the master.tar.gz, i save it in the folder where I want to build the qt3d library.

Then I follow all the steps given on the build qt3d with QT sdk page When I click on build, I get the following error

16:28:14: Running steps for project qt3d...
16:28:14: Starting: "C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin\qmake.exe" C:\libraries\qt3d\qt-qt3d_tdk\qt3d.pro -r -spec win32-msvc2010 "CONFIG+=debug"Reading C:/libraries/qt3d/qt-qt3d_tdk/src/src.pro [C:/libraries/qt3d/Debug/src]
Reading C:/libraries/qt3d/qt-qt3d_tdk/src/threed/threed.pro [C:/libraries/qt3d/Debugsrc/threed]
'perl.exe' is not recognized as an internal or external command,operable program or batch file.
Project MESSAGE: C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin\syncqt.bat -module Qt3D-mkspecsdirC:\Qt\Qt5.0.1\5.0.1\msvc2010/mkspecs -outdir C:/libraries/qt3d/Debug /librariesqt3d/qt-qt3d_tdk
Project ERROR: Failed to run: C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin\syncqt.bat -module Qt3D -mkspecsdir C:\Qt\Qt5.0.1\5.0.1\msvc2010/mkspecs -outdir C:/libraries/qt3d/Debug C:/libraries/qt3d/qt-qt3d_tdk
16:28:15: The process "C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin\qmake.exe" exited with code 3.Error while building/deploying project qt3d (kit: Desktop Qt 5.0.1 MSVC2010 32bit)

When executing step 'qmake'

What i am confused about is, why does the compiler say that perl.exe is not recognised when the file perl.exe is nowhere to be found in neither src.pro nor threed.pro. How does perl come in to the picture.

Also, I am using the master.tar.gz because if i try to use the clone repository using GIT gui, it shows an error message saying that the directory exists. To be very hopnest, I am completely lost with all this GIT stuff.

Any advice will be helpful.

Thanking you in advance.

Rumilly answered 8/3, 2013 at 15:47 Comment(0)
N
2

You will want to follow the instructions from Building Qt5 from Git as well. Perl is needed for the configuration step of the Qt5 source build, which is done through Perl scripts.

Noni answered 8/3, 2013 at 15:51 Comment(5)
Ok, so I already have qt5 installed. but additionally I also installed perl and python. still I am getting the same error message. both the scripting languages are also added to the system path variable. 'perl.exe' is not recognized as an internal or external command,operable program or batch file.Rumilly
@Rumilly - actually, reading the build page that you linked: "Qt 3D is now a Qt 5 Essential and ships as part of Qt 5 and the Qt SDK.". You don't need to build it, it should already be in your SDK.Noni
yes you are right. It comes as a part of QT5, but its not integrated, one needs to build it seperately. check this I receive the same error message when i try to build the source of qt3d which is a quasi part of qt5.Rumilly
Sounds like you'll have to do a full custom Qt5 build to get it.Noni
ok so i downloaded the source for qt5.0.1 for 32 bit systems. but there is no qt3d there. so should I first compile qt5 as it is, and then compile qt3d?Rumilly
P
2

I searched the internet all day looking for help with installing Addons to an installation of QT on windows without having to recompile QT from source. Ive got mine working (so far anyway. Ive only tested one example and it ran and loaded the gui without any errors) This was with qtlocation but Im quessing qt3d is the same process. Give it a go.

Requirements: Get and Install latest version of QT (I used QT 5.1.1 (Mingw32-bit) but am sure this should work for VSS Install perl (I isntalled Activeperl 5.18 64bit) Get a git Client (I used the client on my MAC (XCODE))

==Get Full Git clone repository Using a Git cleint. The downloaded archive from https://qt.gitorious.org/qt/qtlocation just wont do,it doesnt include all files needed == sudo git clone git://gitorious.org/qt/qtlocation.git This should download to a directory called qtlocation Copy downloaded GIT Flat files to your windows OS (e.g. copy to C:\qtlocation)

==On your windows OS === From the Windows. Add the Perl path to your QT command line. I did this by editing C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin\qtenv.bat and adding the following to the path C:\Perl64\site\bin;C:\Perl64\bin; so it read set PATH=C:\Perl64\site\bin;C:\Perl64\bin;C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin;C:\Qt\Qt5.1.1/Tools/mingw48_32\bin;%PATH%

(perl is needed by mingw32-make.exe later).

Now start the command prompt with QT paths by starting Qt 5.1.1 for Desktop by going to Start -> All programs -> -> -> -> Qt 5.1.1 for Desktop (MinGw Version)

CD into the folder you put the qtlocation git files in e.g. cd c:\qtlocation then run

qmake

after this run

mingw32-make.exe

This will take a few minutes to complete. At which point the .dll's are compiled.

===Get QT to recognise the DLL's=== Im sure there may be an easier process but I copied files into locations where I thought they may be needed. I did this by first installing "addons" during my QT 5.1.1 install. (an example addon is qtsensor -- but You dont need to do this). This was so I could see all the folders the sensor addon installed itself Then I went into every folder within my qt mingw folder.

e.g. C:\Qt\Qt5.1.1\5.1.1\mingw48_32 and any where I saw a reference to the sensor plugin, I copied similar files from the qtlocation folders into it. basically I copied the below (you can do this in a command prompt)

copy C:\qtlocation\include\QtPositioning C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include copy C:\qtlocation\examples*.* C:\Qt\Qt5.1.1\5.1.1\mingw48_32\examples copy C:\qtlocation\mkspecs\modules*.* C:\Qt\Qt5.1.1\5.1.1\mingw48_32\mkspecs\modules copy C:\qtlocation\plugins\position C:\Qt\Qt5.1.1\5.1.1\mingw48_32\plugins copy C:\qtlocation\lib\cmake\Qt5Positioning C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib\cmake copy C:\qtlocation\lib\pkgconfig*.* C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib\pkgconfig copy C:\qtlocation\lib*.a C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib copy C:\qtlocation\lib*.prl C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib copy C:\qtlocation\lib*.dll C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin

And thats it. Im sure I didnt need to copy all the files I did above but thought Id be thorough rather than trial and error to find out which was needed.

After this, Fireup QT. and load up one of the examples that came with qtlocation.

P.S. to do this using VSS I think you would swap for "mingw32-make.exe" "nmake install" ?? I think.

The above procedure Im guessing should work also for any addon for QT.

Prelature answered 18/11, 2013 at 21:18 Comment(0)
P
1

I wanted to add a bit to this, as I got further than thedorkknight, but am still having issues. After I installed ActivePerl and added the perl bin directory to my %PATH%, I was able to build the Qt3D repo from source (using QtCreator). The part I'm having trouble with now is the "make install" portion. I tried manually copying the files over to my Qt directory and building the qmldir files from scratch, and it makes QtCreator "see" the Qt3D library but it still refuses to load the .dll. The error says:

C:/Qt/5.1.1/msvc2010/qml/Qt3D/qthreedqmlplugin.dll: The specified module could not be found.

I have MinGW installed and attempted to do a "mingw32-make install" from the build directory, but that failed. Even though that file is most definitely there. Any more thoughts? Or other avenues to get Qt3D working in Windows?

Edit: I found that, because I'd used MSVC as my compiler, I also needed to use the Visual Studio Command Prompt and use nmake install, instead of make install as per the Qt3D installation instructions for Linux. Now it works!

Parathyroid answered 7/11, 2013 at 15:37 Comment(0)
G
0

I followed the following steps from the this link : http://qt-project.org/forums/viewthread/38263

This is an excerpt from that page

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

The main reason for my woes were that I had downloaded Qt3D by using download button available in git. However, this copies the source files into appropriate files. So its best to download the source code using git client using - git clone.

Galilean answered 10/1, 2015 at 17:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.