Tutorial on Compiling Qt 5.1.0 and QtCreator 2.8.0 on Windows 7 using Visual Studio 2012

  • Hello everyone,

    I just got everything working and I thought I would share my adventure with everyone in the chance it might help some people.

    Note: Adding environment extensions...
    Go to my computer and select the "System Properties" on the file tab.
    On the left tab select "Advanced system settings"
    Select "Environment Variables" button near the ok/cancel buttons.
    In the top part (user variables) either create a new entry named PATH or edit the current PATH if it already exists and add your desired folder routes (I'll explain more later when this is needed).
    Extra Note: If there are older qt routes in the PATH variable, delete it. (ONLY THE QT ROUTE... example: c:\jom;c:\perl;c:\qtOldVersion\bin Delete C:\qtOldVersion\bin but leave the c:\jom;c:\perl)

    1. Install Visual Studio 2012
    2. Download and install Perl (strawberry...latest version)
    3. Download and install Python (latest version)
    4. Download and install Jom
    5. Download and install git gui and git bash
    6. Do a file search in the git folder when it's installed for perl
    7. I think there are 3 files that have perl in the name in the git folder... change their extension to .bak so the program does not see them.
    8. Install Ruby (make sure to check the "add to PATH" option during install)
    9. In the start menu, open VS2012 x86 Native Tools Command Console
    10. type perl (enter) python (enter) git (enter) jom (enter)
      Whenever you hit (enter) for each of these, your console should respond to each of them... if it simply responds "I don't know what you typed" then find where you installed them... look for the .exe that runs the program... and add the path (example path: C:\Jom) to the Windows User Environment Variables PATH (see top for instructions)

    NOTE: when you add something to the path, restart the console (Always use the VS2012 x86 Native Tools Command Console) and retest.

    When all of these are working move to step 11.

    1. make a folder in C:\ called "qt5"
    2. start menu->git bash
      This will open a console in which you can use git commands... (DONT USE THE GIT GUI)
    3. type cd c: (enter) cd qt5 (enter)
    4. type git clone git://gitorious.org/qt/qt5.git qt5 (enter)
    5. type cd qt5 (enter)
    6. type git checkout stable (enter)
    7. type ./init-repository --no-webkit (enter)
      Wait for everything to download
      When finished, close the git bash console and go to step 18
    8. Open the VS2012 x86 Native Tools Command Console again and type cd C:\qt5\qt5\ (enter)
    9. type configure -developer-build -opensource -nomake examples -nomake tests (enter)
      Wait for the program to configure and generate a makefile then go to step 20
    10. type jom (enter)
      This step takes quite a while (especially if you igorned the directions and downloaded the webkit and are compiling the examples and tests)
      Wait for step 20 to finish
    11. download the qt creator source code for 2.8.0 from this website (make sure you download the source code).
    12. extract the source code to c:\
    13. Open a VS2012 x86 Native Tools Command Console again and navigate to the qt creator folder in c:\ you just created.
    14. make sure you are in the first folder that has the qtcreator.pro file in it.
    15. type qmake qtcreator.pro (enter)
    16. type jom (enter)

    Tadaaaa, you are done.

    I did exactly these steps and it worked for me perfectly. If you don't do a step or don't do what a step tells you, then I can't help you... You must have some other problem that I did not run into.

    Hope this helps!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.