Git source code compilation of Qt 5 and qtgit source code compilation

Source: Internet
Author: User

Git source code compilation of Qt 5 and qtgit source code compilation

Git source code compilation of Qt 5

Due to some requirements, you need to contact Qt3D. Although Qt 3D has not yet been released, it is said that it has almost completed. The internal version of Qt 3D is 2.0 and will be incorporated into Qt 5.5. There are still some ways to get Qt 3D. That is, use git to obtain the latest source code for compilation. It took several days to finally succeed. Let's share some of your experiences.

Jiang caiyang's original article, first published at: http://blog.csdn.net/gamesdev/article/details/43404647. Welcome to the discussion.

1. Download and install git forwindows. Git is a version control tool for collaborative work in the open-source world. We will not go into details here.

 

2. Download ActivePerl, which is very useful when generating repository.

Http://downloads.activestate.com/ActivePerl/releases/5.20.1.2000/ActivePerl-5.20.1.2000-MSWin32-x64-298557.msi

 

3. Find the gitorious image of Qt 5.

Git@gitorious.org: qt/qt5.git

You can use https protocol clone or git protocol clone. Ssh is required if you use the git protocol for clone. Use git bash, enter ssh-keygen, and generate the public key and private key as prompted. Register on the gitorious website and copy and paste the generated id_rsa.pub into the gitorious website.

4. Search for a folder, such

G:/Qt5-Dev

Right-click the menu, and there is a git bash, where you can perform menu operations.

 

5. clone the remote data first.

Git clone git@gitorious.org: qt/qt5.git.

6. In git bash, It is the msys interactive environment, that is, the sh environment like Unix. This is different from the Windows Command Prompt (CommandPrompt, therefore, you must set the environment variables according to the Unix method.

Export PATH = \

/E/Develop/Perl64/bin :\

/E/Develop/Git/bin :\

/E/Develop/Qt5.4/Tools/mingw491_32/bin :\

/E/Develop/Python3.4

Here, Let Perl be located before Git, because ActivePerl is the officially recommended Perl, and Perl is also available in Git, but I tried it and encountered an error when using the following command:

"GetOptionsFromArray" is notexported by the Getopt: Long module

Can't continue after import errors atinit-repository line 196

BEGIN failed -- compilation aborted atinit-repository line 196.

As a result, ActivePerl is used to complete the task.

 

7. Use the Perl Command to add a library

Standard, use

Perl init-repository.

If you need to specify the initialization library, use-module-subset to specify the module. Because I need to select and test Qt3D, write as follows:

Perl init-repository-module-subset = qtbase, qtsvg, qtdeclarative, qttools, qtxmlpatterns, qtdoc, qlalr, qtrepotools, qtqa, qtlocation, qtgraphicaleffects, outputs, outputs, qtquickcontrols, 3D

If the last time is not completed, you can specify-f to force the re-initialization. In this case, you may need to enter the password multiple times. The password is not displayed. Please note.

 

8. configure compilation started at this time. Generally, you only need

Configure. bat ^

-Developer-build-confirm-license-opensource ^

-Debug-and-release

You can.

 

9. Compile with mingw32-make. Command is

Mingw32-make-j 4

Use four threads to compile Qt.

 

10. Because it is developer-build, it is best not to use makeinstall directly on the source code. The developer edition may have various problems, so it is better to make an error at this time. I used debug for troubleshooting.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.