官术网_书友最值得收藏!

Time for action – configuring and building Qt

Having the sources in place, we can start building the framework. To do that, in addition to a supported compiler, you will need Perl and Python (Version 2.7 or later) installed. For Windows, you will also need Ruby. If you are missing any of the tools, it's a good time to install them. Afterwards, open the command line and change the current working directory to the one containing the Qt source code. Then, issue the following command:

configure -opensource -nomake tests

This will launch a tool that detects whether all the requirements are met and will report any inconsistencies. It will also report the exact configuration of the build. You can customize the build (for example, if you need to enable or disable some features or cross-compile Qt for an embedded platform) by passing additional options to configure. You can see the available options by running configure with the -help switch.

If configure reports problems, you will have to fix them and restart the tool. Otherwise, start the build process by invoking make (or an equivalent like mingw32-make if using MinGW or nmake if using MSVC).

Tip

Instead of nmake, you can use a tool called jom that is bundled with Qt. It will reduce the compilation time on multicore machines, which is what the default nmake tool can't do. For make and mingw32-make, you can pass the -j N parameter, where N stands for the number of cores in your machine.

What just happened?

After some time (usually less than an hour), if all goes well, the build should be complete and you will be ready to add the compiled framework to the list of kits available in Qt Creator.

Tip

In Unix systems after the build gets completed, you can invoke a make install command with super-user privileges (obtained for example, with sudo) to copy the framework to a more appropriate place.

主站蜘蛛池模板: 仪征市| 乡城县| 乌苏市| 诏安县| 辽源市| 买车| 昭苏县| 宁陕县| 聂拉木县| 沧州市| 寿阳县| 福鼎市| 贵定县| 来凤县| 奇台县| 安阳县| 盐池县| 常山县| 茂名市| 克拉玛依市| 杭州市| 南康市| 德州市| 德格县| 资阳市| 阿拉尔市| 和静县| 奉贤区| 万载县| 张家港市| 赫章县| 宜章县| 石首市| 宁明县| 新龙县| 西峡县| 景德镇市| 洛阳市| 方城县| 义乌市| 阿巴嘎旗|