How do I get text-icu working on Windows?
I managed it by doing:
- Download the binaries from http://site.icu-project.org/download/56#TOC-ICU4C-Download, specifically http://download.icu-project.org/files/icu4c/56.1/icu4c-56_1-Win32-msvc10.zip.
- Extract the contents of
icu/bin
into the directoryC:\bin
which is on my%PATH%
. Extract the contents oficu
into the directoryC:\bin\icu
. - Use Stack to run
stack ghci text-icu --extra-lib-dirs=c:\bin --extra-include-dirs=c:\bin\icu\include
. - In GHCi, run
import Data.Text.ICU.Normalize
, then:set -XOverloadedStrings
, thennormalize None "test"
. - For each dll that is reported as cannot be found, e.g.
icuuc.dll
, take theC:\bin\icuuc56.dll
and make a copy atC:\bin\icuuc.dll
. For me, there were three relevant dlls.
After all that, I can normalise a string in ghci
.
This is how windows reacts to a missing static dependency. When the operating system starts a process it looks for static dependencies. If one is missing, then program is not started.
Use depends.exe to find out what import is missing. That could be a missing dll or one that is the wrong version.
Depends is available with 1. Visual Studio 2. The Microsoft Platform SDK 3. Other microsoft packages 4. http://www.dependencywalker.com
It pretty indispensable when tracking down what is happening in this case.