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
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 wocould 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:
From: 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
. 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 before CT the. exp and. ilk files. paste these in
Plugins-> Win32/x64-> imagefromats located in the New QT
Directory.
10. QT is now ready to run with Visual Studio.
From above: http://en.wikibooks.org/wiki/Opticks_Developer_Guide/Getting_Started/Building_Qt_From_Source