我尝试根据Qt手册(MinGW-64-bit)使用MinGW-w64编译ICU 59.1。不幸的是,我收到了以下错误:
$ make && make install
rebuilding config/icucross.mk
rebuilding config/icucross.inc
cd ./config; \
make -f pkgdataMakefile
make[1]: вход в каталог «/c/Qt-deps/icu-59_1/source/config»
*** ERROR - configure could not detect your platform
*** see the readme.html
*** or, try copying icu/source/config/mh-linux to mh-unknown
*** and editing it.
exit 1
rm -rf pkgdata.inc
make[1]: выход из каталога «/c/Qt-deps/icu-59_1/source/config»
rm -rf config/icu-config
/usr/bin/install -c ./config/icu-config-top config/icu-config
chmod u+w config/icu-config
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/Makefile.inc | grep -v '#M#' | uniq >> config/icu-config
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/mh-unknown | grep -v '#M#' | uniq >> config/icu-config
cat ./config/icu-config-bottom >> config/icu-config
chmod u-w config/icu-config
config/icu-uc.pc updated.
config/icu-i18n.pc updated.
config/icu-io.pc updated.
Note: rebuild with "make VERBOSE=1 " to show all compiler parameters.
/bin/sh ./mkinstalldirs lib
mkdir lib
/bin/sh ./mkinstalldirs bin
mkdir bin
make[0]: Making `all' in `stubdata'
make[1]: вход в каталог «/c/Qt-deps/icu-59_1/source/stubdata»
*** ERROR - configure could not detect your platform
*** see the readme.html
*** or, try copying icu/source/config/mh-linux to mh-unknown
*** and editing it.
exit 1
make[1]: выход из каталога «/c/Qt-deps/icu-59_1/source/stubdata»
make: *** [Makefile:147: all-recursive] Ошибка 2
我曾尝试在两台不同的计算机上编译两次:第一台 - Windows 10专业版,最后一台 - Windows 7旗舰版。结果是一样的。使用工具:MSYS2 x64(20161025)。那么,我做错了什么?
答案 0 :(得分:0)
可能通过将参数--build=$MINGW_CHOST --host=$MINGW_CHOST
传递给configure脚本来修复错误“configure无法检测到您的平台”。如果您使用的是正确类型的MSYS2 shell,则$MINGW_CHOST
应为i686-w64-mingw32
或x86_64-w64-mingw32
有关构建ICU的更多有用提示,请查看MSYS2开发人员制作的构建脚本:
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-icu
答案 1 :(得分:0)
我已修复了使用 ../ source / config / mh-的内容替换 ../ source / config / mh-unknown 的相同问题(使用ICU 55.1除外) mingw64
答案 2 :(得分:0)
我已经用同样的问题构建了 icu。 我已经运行这个脚本来纠正这个问题:
del M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-unknow
copy M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-msys-msvc M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-unknow