In my previous post on how to build Qt on Windows, I explained how to build Qt for Windows, using Visual Studio 2010 and prebuilt ICU libraries. If we want to build Qt with Visual Studio 2013, we’ll need to build ICU ourself, and here’s how :
- Download ICU sources from here : http://site.icu-project.org/download
- Unzip in C:\ (you will have a C:\icu folder with C:\icu\readme.html (among others))
- Go into C:\icu\source\common\unicode, edit platform.h and add the following somewhere at the beginning. It’s needed if you want to build Qt :
#define U_CHARSET_IS_UTF8 1
- Go into C:\icu and create a build.bat file, with the following content and run it :
@echo off :: :: setup Visual Studio 2013 environment for x64 builds :: call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 :: :: build :: msbuild source\allinone\allinone.sln /m /target:Build /property:Configuration=Release;Platform=x64 msbuild source\allinone\allinone.sln /m /target:Build /property:Configuration=Debug;Platform=x64
This will build ICU in x64. You can run the same script again and remove the “x86_amd64” argument to the vcvarsall.bat script, and change the Platform property to Win32 to build ICU in x86.