build Qt source

來源:互聯網
上載者:User
Opticks Developer Guide/Getting Started/Building Qt From SourceFrom Wikibooks, the open-content textbooks collection< Opticks Developer Guide
| Getting Started

Current revision

(unreviewed)Jump to: navigation
, search

Instructions on building Qt from source:

(Please note that there are only 32-bit binary builds of Qt
available from TrollTech. Because of this, in order to run Qt in
64-bit, Qt must be manually built on windows in both 32-bit and 64-bit
binary builds.)

Things to do before building Qt:

- First extract the Qt zip file to a directory on your system.

- If you plan on building a 64-bit version of Qt, make a copy of the
extracted Qt directory to another one, but add 64-bit to end of the new
directory name. This new directory will be used to make the Qt 64-bit
binary build. (For example if the name of the extracted Qt directory is
Qt-win-src, then the name would be Qt-win-src-64-bit).

A. Building the 32-bit version:

1. To make the 32-bit build of Qt, go to Visual Studio 2005->Visual Studio tools in the start menu and click on

  Visual Studio 2005 Command Prompt.

2. In the Command Prompt, go to the 32-bit Qt directory you just extracted.

3. Once you in the directory, type:

       configure.exe -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg

This will generate a Makefile.

4. Now to start the compilation, run nmake by typing:

       nmake

5. Once the compilation is complete, then type:

       nmake install

The reason for doing this is so you will only need the include directory from Qt, not the src one.

6. The 32-bit binary build of Qt is now done.

B. Building the 64-bit version:

1. To make the 64-bit build of Qt, go to Visual Studio 2005->Visual Studio tools in the start menu and click on

  Visual Studio 2005 x64 Win64 Command Prompt.

2. In the Command Prompt, go to the 64-bit Qt directory you just extracted.

3. Once you in the directory, type:

       configure.exe -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg

This will generate a Makefile.

4. Now to start the compilation, run nmake by typing:

       nmake

5. Once the compilation is complete, then type:

       nmake install

The reason for doing this is so you will only need the include directory from Qt, not the src one.

6. The 64-bit binary build of Qt is now done.

C. Setting up the folders:

 

下文轉自:http://en.wikibooks.org/wiki/Opticks_Developer_Guide/Getting_Started/Building_Qt_From_Source

Once Qt is done building, don't move it to the dependencies folder just yet. You will still need to do some work on the files.

1. Create a new directory named Qt in the dependencies folder.

2. Inside the new Qt directory, Create the following 4 folders: bin, include, lib, and plugins.

3. Inside each of these folders, Make a win32 folder if you are
using the 32-bit version or a x64 folder if you are using the 64-bit
version.

4. Copy all of the folders in the old Qt directory include folder and paste them in the new directory

  include -> win32/x64 folder.

5. Next go to the old Qt directory bin folder and copy all of the
.dll files as well as the mac.exe, qmake.exe, rcc.exe, and uic.exe.
Paste these files in the new Qt directory

  bin -> win32/x64 folder.

6. Also copy the .pdb files located in the old Qt directory lib folder and paste them in the new directory

  bin -> win32/x64 folder.

7. Now Move all of the .lib files in the old directory lib folder and put them in the new Qt directory

  lib -> win32/x64 folder.

8. Go to the plugins win32/x64 folder in the new Qt directory and create a new folder named imageformats.

9. In the plugin -> imageformats folder in the old directory,
copy all files expect the .exp and .ilk files. Paste these in the
plugins -> win32/x64 -> imagefromats located in the new Qt
directory.

10. Qt is now ready to run with Visual Studio.

 

上文轉自:http://en.wikibooks.org/wiki/Opticks_Developer_Guide/Getting_Started/Building_Qt_From_Source

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.