build Qt source

来源:互联网 发布:国产自主三维软件 编辑:程序博客网 时间:2024/05/16 04:42

Opticks Developer Guide/Getting Started/Building Qt From Source

From Wikibooks, the open-content textbooks collection

< Opticks Developer Guide | Getting Started
Jump to: navigation, search

Instructions on building Qt from source:


(Please note that there are only 32-bit binary builds of Qtavailable from TrollTech. Because of this, in order to run Qt in64-bit, Qt must be manually built on windows in both 32-bit and 64-bitbinary 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 theextracted Qt directory to another one, but add 64-bit to end of the newdirectory name. This new directory will be used to make the Qt 64-bitbinary build. (For example if the name of the extracted Qt directory isQt-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 areusing the 32-bit version or a x64 folder if you are using the 64-bitversion.

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 theplugins -> win32/x64 -> imagefromats located in the new Qtdirectory.

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

 

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

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 辐射4容积满了怎么办 辐射4装甲没电了怎么办 sim卡pin码忘了怎么办 安卓的se已禁用怎么办 刚拿到驾照没车怎么办 驾驶证过期了6年怎么办 驾驶证过期7个月怎么办 驾驶换证过期了怎么办 和喜欢的人聊天冷场怎么办 老公和小三有了小孩怎么办 战网账号忘记了怎么办 战网邮箱忘了怎么办 捷信分期逾期了怎么办 欠捷信7万还不了怎么办 苹果6s阴阳屏怎么办 碰到碰瓷的人怎么办 如果遇到碰瓷的怎么办 对交通事故责任认定书不服怎么办 违停15天没处理怎么办 衣服反光条掉了怎么办 脸过敏起小疙瘩怎么办 过敏怎么办怎么好得快 眉毛在眉骨下面怎么办 踩到地雷怎么办知乎 在边境踩到地雷怎么办 插在花泥里的花怎么办 瓶插绣球花蔫了怎么办 水养绣球花蔫了怎么办 鲜切绣球花蔫了怎么办 崩坏2仓库满了怎么办 dnf88级没任务了怎么办 0号柴油冻住了怎么办 不小心喝了生水怎么办 不小心吃了蟑螂怎么办 以租代购还不起怎么办 孩子被教官打了怎么办 三岁宝宝叛逆期怎么办 三岁宝宝很叛逆怎么办 孩子不听话怎么办有什么方法呢 打了三岁的宝宝怎么办 2岁半宝宝不听话怎么办