Qt4Compilation

From wiki
Jump to navigationJump to search
  1. Read this page entirely before doing anything
  2. On Linux:
    1. Download Qt source code from this page (last version is available here) or here for older versions
    2. Create a new folder in /devel/linux/Qt4 called Qt4{version_number}: eg: mkdir /devel/linux/Qt4/Qt4.8.1
    3. Copy the downloaded file in the newly created folder
    4. Go in that directory: eg: cd /devel/linux/Qt4/Qt4.8.1
    5. Extract the downloaded archive: eg: tar -xvzf qt-everywhere-opensource-src-4.8.1.tar.gz
    6. Go in the extracted folder: eg: cd qt-everywhere-opensource-src-4.8.1
    7. Configure Qt and select the directory in which Qt has to be installed: eg: ./configure -prefix /devel/linux/Qt4/Qt4.8.1/Qt4.8.1_linux64
    8. During the configuration, select 'o' to compile Qt open-source version
    9. Read the licenses if you want, and if you agree with them, type 'yes'. Otherwise don't compile Qt
    10. Compile Qt: eg: make -j 4
    11. Install Qt: make install
    12. Verify that everything went well and that the installation directory (eg: /devel/linux/Qt4/Qt4.8.1/Qt4.8.1_linux64) was created and populated with the library files.
    13. You should now be able to removed the source code directory and the downloaded archive from the system.
  3. On Windows:
    1. Download qt-everywhere-opensource-src-4.7.4.zip
    2. Unzip file
    3. Open Visual Studio Prompt (Start menu->All Programs->Miccrosoft Visual Studio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt)
    4. Go in Qt source directory
    5. Type: configure.exe -release -opensource