Windows下编译qt-src-5.15.10

首先从镜像站点下载qt源码:

https://download.qt.io/static/mirrorlist/               下载QT的镜像站点

下载源码后解压到  F:  盘

创建编译目录F:\qtbuild

打开VS2019的  X64 Native Tools Command Prompt for VS 2019

进入到源码目录 cd   F:\qt-everywhere-opensource-src-5.15.10

执行

configure.bat  -prefix  "F:\qtbuild"  -opensource  -shared  -static  -compile-examples  -nomake tests
Note: Overriding option 'shared' with 'no' (was: 'yes')

Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

Note: The following modules are not being compiled in this configuration:
    webenginecore
    webengine
    webenginewidgets
    pdf
    pdfwidgets

WARNING: Python version 2 (2.7.5 or later) is required to build QtWebEngine.

WARNING: Python version 2 (2.7.5 or later) is required to build QtPdf.

WARNING: QtWebEngine will not be built.

WARNING: QtPdf will not be built.

Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'F:\qtbuild'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

出现上面的内容,代表配置成功, 接下来就可以编译了。

执行nmake开始编译

nmake
nmake  install

安装后相关的库和头文件都在 F:\qtbuild 里面,就可以使用了

你可能感兴趣的:(qt,开发语言)