I wanted to try out the latest version of lamdu, a “live programming” environment (still in early development). It uses graphics-drawingcombinators which in turn depends on FTGL to accomplish its text-drawing-in-OpenGL magic. On linux this isn’t really an issue – a simple ‘cabal install’ does it, at least on the version of ubuntu that I use (EDIT: You’ll probably first need to install the ftgl dev files, e.g.
sudo apt-get -y install libftgl-dev)
Windows? No problem! With a few hacks, you’ll be rendering text in no time. This worked on my 64-bit Windows 8 installation but should work on any version since Windows XP.
- I’m assuming you have the latest Haskell Platform for Windows installed. If not, do it!
- Get 32-bit windows binaries for FreeType and FTGL. I downloaded them from: http://www.opencascade.org/getocc/download/3rdparty/, but you might as well compile them from the official sources.
- Copy the FTGL.dll and FreeType.dll to:
- 64-bit version of Windows: copy to c:\windows\syswow64
- 32-bit version of Windows: copy to c:\windows\system32
- Install the Visual C++ 2010 redistributable, 32-bit version
- Assuming you’ve unpackged the FTGL binaries in some directory “<blabla>\ftgl-2.1.3-vc10-32”, run the following:
cabal install ftgl --extra-include-dirs=<blabla>\ftgl-2.1.3-vc10-32\include --extra-lib-dirs=<blabla>\ftgl-2.1.3-vc10-32\lib --reinstall --force-reinstalls
- cabal build / install whatever executable you wanted to (in my case, lamdu)
That’s it! Hope I saved someone the near-hour I spent figuring this out.