1 需要做的前期准备
配置好C++的编译环境
- win:推荐MSVC 也就是下载Visual Studio(建议2019)
- linux: gcc
2 下载项目源码
- 仓库地址:https://github.com/qt/qt5.git 把他clone下来
- 可以自己选择需要的模块下载,例如
qtbase:git submodule update --init qtbase
- 如果需要直接下载所有的模块:
git submodule update --init --recursive
3 开始编译源码
- 需要注意是编译x86还是x64版本的,调用 x86 Native Tools Command Prompt for VS 2019 (根据自己需要编译的目标和本地的环境来进行选择)
- win中需要的编译工具
- Supported compiler (Visual Studio 2012 or later,
MinGW-builds gcc 4.9 or later) - Perl version 5.12 or later [https://strawberryperl.com/]
- Python version 2.7 or later [http://www.activestate.com/activepython/]
- Ruby version 1.9.3 or later http:/
- Supported compiler (Visual Studio 2012 or later,