Issue Building ICU on Windows for Inflection Testing

66 views
Skip to first unread message

baha bouali

unread,
Mar 17, 2025, 5:03:35 PMMar 17
to icu-support

Hello Everyone,  


I’ve been stuck for the past two weeks trying to build ICU on Windows as part of my preparation for the Google Summer of Code (GSoC) 2025. I’m working on a proposal for the project "Integrate Unicode Inflection Into Message Format 2", and I need to test ICU’s inflection functionalities on my machine (C++).  


Here’s what I’ve done so far:  


1. Downloaded the ICU source code and extracted it to C:\Users\me. 

2. Opened a Developer Command Prompt for Visual Studio 2022.  

3. Created a `build` directory inside the ICU source directory:  

   

   cd ~\icu-main\icu4c  

   mkdir build  

   cd build  


4. Ran CMake to generate build files:  

   cmake .. -G "Visual Studio 17 2022" -A x64  

   

This completed successfully, detecting the compiler and generating build files.  


5. Attempted to build ICU:  

   cmake --build . --config Release  


I also tried following through the ICU Windows Setup Documentation.

However, the build process fails with the following error :
Cannot open “icui18n.lib” file or not recognize so many other header (.h) files. 


System Details : 

- Windows 10  

- CLion 2022.3.2 (uses VS 2022 toolchain with MSVC compiler)

- Visual Studio 2022 (Community Edition) with C++ workload  

- CMake 3.28.1  

- ICU version: 75




Could someone please help me troubleshoot this issue? Specifically:  

  1. Is the process I’m following correct for building ICU on Windows?  
  2. Are there any additional steps to successfully build ICU and test inflection functionalities?  


Lastly, if building ICU is too hard on Windows, are there other tools or frameworks (e.g., Apple Foundation) I can use to test inflection functionalities?  


Shane Carr

unread,
Mar 17, 2025, 5:36:36 PMMar 17
to baha bouali, George Rhoten, icu-support
Hi, @George Rhoten can help with questions about Unicode Inflections.

--
You received this message because you are subscribed to the Google Groups "icu-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-support...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-support/7d7a2e64-a64b-46ec-96fe-16d586711183n%40unicode.org.

--
You received this message because you are subscribed to the Google Groups "ICU - Team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-team+u...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-team/7d7a2e64-a64b-46ec-96fe-16d586711183n%40unicode.org.

George Rhoten

unread,
Mar 17, 2025, 9:03:05 PMMar 17
to baha bouali, icu-support

On Mon, Mar 17, 2025 at 2:03 PM baha bouali <baha.bo...@gmail.com> wrote:

Tim Chevalier

unread,
Mar 17, 2025, 9:03:11 PMMar 17
to icu-s...@unicode.org

Hi, Baha --

It sounds like you may have left out step 2 in the Windows building instructions:

"Be sure that the ICU binary directory, (ex: <ICU>\bin\), is included in the PATH environment variable. The tests will not work without the location of the ICU DLL files in the path. Note that the binary directory name can depend on what architecture you select when you compile ICU. For x86 or 32-bit builds, the binary directory is bin. Whereas for x64 or 64-bit builds the binary directory is bin64."

If you're building from the command line, you can use the command line to view the contents of the PATH environment variable; otherwise, in the MSVC GUI, you can change the "Additional Library Directories". This should help: https://learn.microsoft.com/en-us/cpp/build/reference/vcpp-directories-property-page?view=msvc-170

By the way, if you want to experiment with MessageFormat 2.0, it would be better to use ICU version 77.

Cheers,

Tim

Tim Chevalier

unread,
Mar 17, 2025, 9:03:16 PMMar 17
to baha bouali, icu-support

[Sorry for the possible duplicate post, I think my reply-all settings were wrong the first time.]

Hi, Baha --

It sounds like you may have left out step 2 in the Windows building instructions:

"Be sure that the ICU binary directory, (ex: <ICU>\bin\), is included in the PATH environment variable. The tests will not work without the location of the ICU DLL files in the path. Note that the binary directory name can depend on what architecture you select when you compile ICU. For x86 or 32-bit builds, the binary directory is bin. Whereas for x64 or 64-bit builds the binary directory is bin64."

If you're building from the command line, you can use the command line to view the contents of the PATH environment variable; otherwise, in the MSVC GUI, you can change the "Additional Library Directories". This should help: https://learn.microsoft.com/en-us/cpp/build/reference/vcpp-directories-property-page?view=msvc-170

By the way, if you want to experiment with MessageFormat 2.0, it would be better to use ICU version 77.

Cheers,

Tim


On 3/17/25 14:03, baha bouali wrote:
Reply all
Reply to author
Forward
0 new messages