相关文件下载链接:
13.2.0版的MinGW64 | |
3.2.4版的wxwidgets |
相关环境变量设置:右键单击“我的电脑”->属性->高级系统设置->环境变量->系统变量->Path->编辑->新建,输入解压后的mingw64中的bin路径。例如:
D:\devolopment\mingw64\bin\
测试成功安装与否,在上述环境变更设置好后,重新进入终端中,执行GCC命令:
gcc -v
Using built-in specs.
COLLECT_GCC=D:\devolopment\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=D:/devolopment/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-w64-mingw32
Configured with: ../configure --prefix=/R/winlibs64ucrt_stage/inst_gcc-13.2.0/share/gcc --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --enable-offload-targets=nvptx-none --with-pkgversion='MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r7' --with-tune=generic --enable-checking=release --enable-threads=posix --disable-sjlj-exceptions --disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap --enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath --disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-stabs --disable-symvers --enable-languages=c,c++,fortran,lto,objc,obj-c++ --disable-gold --disable-nls --disable-stage1-checking --disable-win32-registry --disable-multilib --enable-ld --enable-libquadmath --enable-libada --enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string --enable-libgomp --enable-graphite --enable-mingw-wildcard --enable-libstdcxx-time --enable-libstdcxx-pch --with-mpc=/d/Prog/winlibs64ucrt_stage/custombuilt --with-mpfr=/d/Prog/winlibs64ucrt_stage/custombuilt --with-gmp=/d/Prog/winlibs64ucrt_stage/custombuilt --with-isl=/d/Prog/winlibs64ucrt_stage/custombuilt --disable-libstdcxx-backtrace --enable-install-libiberty --enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=auto --enable-clocale=generic --with-libiconv --with-system-zlib --with-build-sysroot=/R/winlibs64ucrt_stage/gcc-13.2.0/build_mingw/mingw-w64 CFLAGS='-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32 -march=nocona -msahf -mtune=generic -O2' CXXFLAGS='-Wno-int-conversion -march=nocona -msahf -mtune=generic -O2' LDFLAGS='-pthread -Wl,--no-insert-timestamp -Wl,--dynamicbase -Wl,--high-entropy-va -Wl,--nxcompat -Wl,--tsaware' LD=/d/Prog/winlibs64ucrt_stage/custombuilt/share/binutils/bin/ld.exe
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r7)
1.主要编译参数如下表:
变量 | 含义 | 值 | 含义 |
BUILD | 控制编译wxWidgets是debug版本或release版本,debug版本时,库名带后缀d. | debug | 生成debug库,后缀有d |
release | 生成release库 | ||
SHARED | 控制编译wxWidgets成DLL或是static, DLL时,多个wxWidgets工程可共用相同的DLL,工程发布时,必须包含该DLL文件 | 0 | 生成static静态链接库文件 |
1 | 生成dll链接文件 | ||
MONOLITHIC | 控制编译成1个独立的DLL库,还是多个DLL库 | 0 | 生成分离的多文件库 |
1 | 将所有库编译成一个单独库文件 | ||
UNICODE | 控制编译出的wxWidgets是否支持unicode,若使用汉字,必须支持unicode | 0 | 不支持uncode编码 |
1 | 支持uncode编码 |
2.编制编译批处理文件
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
mingw32-make -f makefile.gcc SHARED=0 UNICODE=0 BUILD=release
mingw32-make -f makefile.gcc SHARED=1 UNICODE=0 BUILD=release
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=debug
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
mingw32-make -f makefile.gcc SHARED=0 UNICODE=0 BUILD=debug
mingw32-make -f makefile.gcc SHARED=1 UNICODE=0 BUILD=debug
3.清理编译的垃圾文件
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=0 UNICODE=0 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=0 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=0 UNICODE=0 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=0 BUILD=debug clean
标签:gcc,enable,wxwidgets,22,--,mingw32,BUILD,UNICODE,最新版 From: https://www.cnblogs.com/merrynuts/p/18151550