1.官方配置说明
https://wiki.qt.io/Compiling-ICU-with-MSVC
2.icu下载地址
https://github.com/unicode-org/icu/releases
3.cygwin下载地址
https://www.cygwin.com/install.html
4.安装cygwin程序
选中dos2unix,make,gcc-c++等,一路next即可
5.修改Configure为MT(重要)
runConfigure里找到MSVC,由MD改为MT,MDd改为MTd.否则会出现编译Qt时找不到icu的情况.
6.编译
REM Set up \Microsoft Visual Studio 2017
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
SET PATH=%PATH%;C:\Cygwin64\bin
SET ICU_SOURCE=C:\Users\fengmu\Desktop\icu4c-59_2-src\icu\source
SET ICU_PREFIX=/cygdrive/c/icu
cd %ICU_SOURCE%
dos2unix *
dos2unix -f configure
bash runConfigureICU Cygwin/MSVC -prefix=%ICU_PREFIX%/x64 -enable-static -disable-shared
make
make install
make clean
bash runConfigureICU --enable-debug --disable-release Cygwin/MSVC -prefix=%ICU_PREFIX%/x64 -enable-static -disable-shared
make
make install
make clean
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
SET PATH=%PATH%;C:\Cygwin64\bin
SET ICU_SOURCE=C:\Users\fengmu\Desktop\icu4c-59_2-src\icu\source
SET ICU_PREFIX=/cygdrive/c/icu
cd %ICU_SOURCE%
dos2unix *
dos2unix -f configure
bash runConfigureICU Cygwin/MSVC -prefix=%ICU_PREFIX%/x86 -enable-static -disable-shared
make
make install
make clean
bash runConfigureICU --enable-debug --disable-release Cygwin/MSVC -prefix=%ICU_PREFIX%/x86 -enable-static -disable-shared
make
make install
make clean
pause
7.参考链接
https://blog.51cto.com/u_15883582/5873377
本文来自投稿,不代表本站立场,如若转载,请注明出处: