mingw是什么软件(mingw使用教程)

2022-07-17,,

2. 阅读源代码文件夹中的readme,了解编译所需环境。

3. 设置环境变量及path

添加环境变量_qtdir 值为d:\
qtstaticlibrarycompilation\5.12.6

并在path中添加路径:

%_qtdir%\qt-everywhere-src-5.12.6

%_qtdir%\qt-everywhere-src-5.12.6\qtbase\bin

%_qtdir%\qt-everywhere-src-5.12.6\gnuwin32\bin

%_qtdir%\tools\mingw\mingw730_64

4. 以管理员身份运行windows命令行。

“gcc -v” 检查gcc版本及路径(指定的工具包路径)

“perl -v” 检查perl版本

“python” 检查python版本,ctrl + z退出

“sh” 确保此命令不执行,以免影响ming32-make

5. 切换目录 cd /d d:\
qtstaticlibrarycompilation\5.12.6\build\qt_build_mingw730_64_static

配置:

d:\qtstaticlibrarycompilation\5.12.6\qt-everywhere-src-5.12.6\configure -static -debug-and-release -opensource -confirm-license -platform win32-g++ -sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype –compile-examples=no -nomake tests -nomake examples -skip qt3d -no-opengl -prefix d:\qtstaticlibrarycompilation\5.12.6\library\mingw730_64_static

6. mingw32-make -j8 进行编译,根据机器的情况,分配jobs数量。

7. mingw32-make install

8. 添加qt version,见“qt version添加”文档。

《mingw是什么软件(mingw使用教程).doc》

下载本文的Word格式文档,以方便收藏与打印。