Saturday, October 20, 2012

Post Qt Installation Setup (Windows)

After installation of the Qt SDK, the tools (git, MinGW and CMake) need to be integrated with QtCreator.  On Linux, no further configuration is needed as all tools will be located where QtCreator can find them.  However, on Windows, this is not the case.

For git, the binary directory for the git tools need to be in the execution path.  On Windows XP, right-click on My Computer and select Properties.  On the Advanced tab, click the Environment Variables button.  On the lower pane under System Variables, find and selected the Path variable.  Click Edit and add C:\Program Files\Git\bin somewhere on the Variable value line (make sure to add the semicolon separator).  On Windows 7 the instructions are similar.  Start by right-clicking Computer and select Properties.  Now select Advanced system settings, go to the Advanced tab and follow the same instructions except add C:\Program Files (x86)\Git\bin to Path.

Now start QtCreatorQtCreator should have automatically found the external MSYS/MinGW 4.6.2 previously installed.  On the Tools menu select Options, go to the Build & Run page, and select the Tool Chains tab.  Under Auto-detected there will be an entry Mingw as a GCC for Windows targets (if the MinGW 4.4 was installed as part of Qt SDK) and an entry MinGW (x86 32bit), which is the previously installed MinGW 4.6.2.  The g++ path can be seen by selecting this entry, which should show C:\MinGW\bin\g++.exe.

For the final tool, CMake, select the CMake tab next to Tool Chains.  If the correct path was added to the Path under Environment Variables, the path to cmake.exe will already be set.  Otherwise, click Browse and find cmake.exe, which will be found under C:\Program Files\CMake 2.8\bin\cmake.exe (Windows XP) or
C:\Program Files (x86)\CMake 2.8\bin\cmake.exe (Windows 7) if CMake was installed in the default location.  Don't select cmake-gui.exe.

Now it's time to see if QtCreator is able to build and debug the ibcp program before we start any Qt related modifications.

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)