build Qt source

Opticks Developer Guide/Getting Started/Building Qt From Source

From Wikibooks, the open-content textbooks collection

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值