Qt 3D Compilation

Source: Internet
Author: User

In the summary of actual 3D Game Development, the editor is an important part of the machine. A good and robust Editor, Kawaii is a project that gets twice the result with half the effort. On the contrary, an editor with a lot of bugs that does not focus on operational habits will not only make the project more difficult, but also weaken the enthusiasm of developers and even allow developers to reject the project.

Download

The Qt/3D source code is hosted in Gitorious and can be captured directly using git.

Git clone git: // gitorious.org/qt-labs/qt3d.gitis not clear about what is the cause. In the example of gitin, it often fails (fix me ). You may need to clone your own repository and then use the git ssh method for crawling. Download the compressed package (qt-labs-qt3d-master.tar.gz ).

Preparations before Compilation

Because Qt/3D uses many private files in Qt source code, we need to have a self-compiled Qt environment.

Windows

In Windows, this should be okay.

Download the source code, decompress it to a directory (such as D: \ Qt4.7.4), and then

 
 
  1. configure   
  2. make 

Linux

In linux, there is a small problem.

For example, download the source code ~ /Qt4.7.4

 
 
  1. configure   
  2. make & make install 

At this time, all the private files of Qt are still in ~ /Qt4.7.4, but Qt is installed to/usr/local // usr/local/Trolltech/Qt-4.7.4. What should I do in this situation?

It is not clear that there is no better way (specify prefix When configuring Qt ?), Personally (set the environment variable before compiling Qt/3D)

 
 
  1. export MYQTDIR=/home/debao/Qt4.7.4  
  2. export   
  3. CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MYQTDIR/include:$MYQTDIR/include/QtCore/:$MYQTDIR/  
  4. include/QtDeclarative/:$MYQTDIR/include/QtGui/:$MYQTDIR/include/QtDbusQt/3D 

The QtDbus module used by a plug-in. Therefore, you must ensure that this module is enabled during Qt compilation. For ubuntu, Qt installs a libdbus-1-dev before configure

Note: Finally, you can add the-developer-build option in configure to implement the results in windows. Dbzhang800 2011.06.01

Compile

The shadow build method provided in Qt/3D Manual (For details, refer to the shadow build method of qmake ).

If we do not use shadow build, directly go to the source code directory.

 
 
  1. qmake opengl.pro  
  2. make  
  3. make install 

That's all.

As needed, you may need to set the search PATH for the dynamic library, LD_LIBRARY_PATH in linux and PATH in windows.

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.