Building ICU 32/64 on Windows: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Building ICU common and i18n projects for Boost ==
= 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
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
Line 5: Line 5:
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.
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 ===
== Specimen Build Platform/Environment ==


*windows server 2008 R2 SP1 64
*windows server 2008 R2 SP1 64
*install sdk7.1 minimally
*install sdk7.1 minimally
*install visual studio c++ 2010 express
*install visual studio c++ 2010 express (optional if not building debug libs)


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
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 ===
== Get ICU Source ==


Download
Download
Line 23: Line 23:
  f:\icu4c-4_6_1-src
  f:\icu4c-4_6_1-src


Open sdk7.1 command prompt and get into icu *source* folder
== Script to build x86 x64 Release+Debug ==


>>>Windows SDK 7.1 Command Prompt
Can make VS2005 VS2008 VS2010 if you amend parameters in the heading
f:
cd \icu4c-4_6_1-src\icu\source


=== Building x64 ===
rem xp 2008 win7 for VS2005 VS2008 VS2010 respectively
set SETENV_TARGET=2008


==== x64/Release ====
http://code.google.com/p/exodusdb/source/browse/trunk/buildicu.cmd


<pre>
[[older instructions]]
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
</pre>
 
Check the lib64 folder for 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 must be done AFTER setenv.
 
<pre>
setenv /debug
 
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
</pre>
 
Check the lib64 folder for icuucd.lib and icuind.lib
 
=== Building Win32 (x86) Release and Debug===
 
==== x86/Release ====
 
<pre>
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
@if not exist ..\lib\icudt.lib @echo ..\lib\icudt.lib not built!
@if not exist ..\lib\icuin.lib @echo ..\lib\icuin.lib not built!
@if not exist ..\lib\icuuc.lib @echo ..\lib\icuuc.lib not built!
</pre>
 
==== x86/Debug ====
 
<pre>
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
@if not exist ..\lib\icuind.lib @echo ..\lib\icuind.lib not built!
@if not exist ..\lib\icuucd.lib @echo ..\lib\icuucd.lib not built!
</pre>

Latest revision as of 13:03, 23 June 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 (optional if not building debug libs)

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

Script to build x86 x64 Release+Debug

Can make VS2005 VS2008 VS2010 if you amend parameters in the heading

rem xp 2008 win7 for VS2005 VS2008 VS2010 respectively
set SETENV_TARGET=2008

http://code.google.com/p/exodusdb/source/browse/trunk/buildicu.cmd

older instructions