Building ICU 32/64 on Windows: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 22: Line 22:


  f:\icu4c-4_6_1-src
  f:\icu4c-4_6_1-src
Open sdk7.1 command prompt and get into icu *source* folder
>>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source


== Building x64 ==
== Building x64 ==
Line 34: Line 28:


<pre>
<pre>
rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source
setenv /release
setenv /release


Line 45: Line 43:


dir ..\lib64\*.lib
dir ..\lib64\*.lib
rem should find lib64 folder has icudt.lib, icuuc.lib and icuin.lib
</pre>
</pre>


Check the lib64 folder for icudt.lib, icuuc.lib and icuin.lib


=== x64/Debug ===
=== x64/Debug ===
Line 53: Line 51:
Producing the proper debug versions of icu may not be necessary if your objective is only to produce release versions of the boost libraries (and you use the work-around to avoid the need for icu debug libraries)
Producing the proper debug versions of icu may not be necessary if your objective is only to produce release versions of the boost libraries (and you use the work-around to avoid the need for icu debug libraries)


NOTE: To produce the DEBUG version of the libraries, you need Visual Studio's bscmake on the path.
NOTE: To produce the DEBUG version of the libraries, you need Visual Studio's bscmake on the path - vsvars32 does that.


vsvars32 must be done AFTER setenv.
<pre>
rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source


<pre>
setenv /debug
setenv /debug


rem vsvars32 MUST be after setenv
vsvars32 x64
vsvars32 x64


Line 71: Line 72:


dir ..\lib64\*d.lib
dir ..\lib64\*d.lib
rem should find lib64 folder has icuucd.lib and icuind.lib
</pre>
</pre>


Check the lib64 folder for icuucd.lib and icuind.lib


== Building Win32 (x86) Release and Debug==
== Building Win32 (x86) Release and Debug==
Line 79: Line 80:
=== x86/Release ===
=== x86/Release ===
<pre>
<pre>
rem >>>Windows SDK 7.1 Command Prompt
f:
f:
cd \icu4c-4_6_1-src\icu\source
cd \icu4c-4_6_1-src\icu\source
Line 93: Line 95:


dir ..\lib\*.lib
dir ..\lib\*.lib
rem should find lib folder has icudt.lib, icuuc.lib and icuin.lib
</pre>
</pre>


Line 98: Line 101:


<pre>
<pre>
rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source
setenv /debug /x86
setenv /debug /x86


Line 112: Line 119:


dir ..\lib\*d.lib
dir ..\lib\*d.lib
rem should find lib folder has icuucd.lib and icuind.lib
</pre>
</pre>

Revision as of 01:12, 16 May 2011

Building ICU common and i18n projects for Boost

You do not need to build the whole of ICU just to get icudt.lib, icuuc.lib and icuin.lib required by boost regex for unicode aware regex. The "common" project makes icudt.lib icuuc.lib and the "i18n" project makes icuin.lib

The release configuration of ICU can be built with SDK only. Visual Studio is only needed to create debug versions. Visual Studio Express is sufficient and it can be run in command mode.

Specimen Build Platform/Environment

  • windows server 2008 R2 SP1 64
  • install sdk7.1 minimally
  • install visual studio c++ 2010 express

VS is needed for building debug versions even while doing command line build. It might even be needed for building release versions if the projects arent setup quite right for msbuild+sdk only. Presence of VS doesnt mean that we are going to use GUI

Get ICU Source

Download

http://download.icu-project.org/files/icu4c/4.6.1/icu4c-4_6_1-src.zip

"extract all" to

f:\icu4c-4_6_1-src

Building x64

x64/Release

rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source

setenv /release

cd common
msbuild /p:Platform=x64 /p:Configuration=Release
cd ..

cd i18n
msbuild /p:Platform=x64 /p:Configuration=Release
cd ..

dir ..\lib64\*.lib
rem should find lib64 folder has icudt.lib, icuuc.lib and icuin.lib


x64/Debug

Producing the proper debug versions of icu may not be necessary if your objective is only to produce release versions of the boost libraries (and you use the work-around to avoid the need for icu debug libraries)

NOTE: To produce the DEBUG version of the libraries, you need Visual Studio's bscmake on the path - vsvars32 does that.

rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source

setenv /debug

rem vsvars32 MUST be after setenv
vsvars32 x64

cd common
msbuild /p:Platform=x64 /p:Configuration=Debug
cd ..

cd i18n
msbuild /p:Platform=x64 /p:Configuration=Debug
cd ..

dir ..\lib64\*d.lib
rem should find lib64 folder has icuucd.lib and icuind.lib


Building Win32 (x86) Release and Debug

x86/Release

rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source

setenv /release /x86

cd common
msbuild /p:Platform=win32 /p:Configuration=Release
cd ..

cd i18n
msbuild /p:Platform=win32 /p:Configuration=Release
cd ..

dir ..\lib\*.lib
rem should find lib folder has icudt.lib, icuuc.lib and icuin.lib

x86/Debug

rem >>>Windows SDK 7.1 Command Prompt
f:
cd \icu4c-4_6_1-src\icu\source

setenv /debug /x86

rem must be AFTER setenv
vsvars32 x86

cd common
msbuild /p:Platform=win32 /p:Configuration=Debug
cd ..

cd i18n
msbuild /p:Platform=win32 /p:Configuration=Debug
cd ..

dir ..\lib\*d.lib
rem should find lib folder has icuucd.lib and icuind.lib