From HaskellWiki
Jump to: navigation, search

This article is a stub. You can help by expanding it.

A binding for the OpenAL Utility Toolkit


Windows specific actions

The following must be installed first:

  • MSYS2 or MinGW/MSYS
  • OpenAL
  • The C++ package of ALUT, freealut

To install freealut:

  • Start a shell
  • Go to the directory where you want the freealut source code, for example C:\Temp
  • Fetch the source code with Git:
git clone
  • Install CMake
  • Set the search path in such a way that there is no sh.exe in it; you can use command where sh to find the directories that must be removed (CMake seems to be allergic to sh.exe)
  • Start cmake-gui
  • Enter the directory of the freealut source code (C:\Temp\freealut) and the directory where you want the compile result, for example C:\Temp\freealut\build
  • Add the entries in the table below, by pressing "Add Entry" for each entry
Name Type Value
CMAKE_GENERATOR String MinGW Makefiles
OPENAL_INCLUDE_DIR Filepath the directory containing the OpenAL header file
  • Press "Configure"
  • Press "Generate"; this will generate a makefile
  • Edit freealut\include\AL\alut.h:
Change line 34:
#define ALUT_APIENTRY __cdecl
#define ALUT_APIENTRY __stdcall
  • In the shell, go to the directory where you want the compile result, for example C:\Temp\freealut\build
  • Start the MSYS shell:
  • Run the make utility:
mingw32-make install
  • Set environment variables as follows:
Set LIBRARY_DIR=C:\Libraries
If you need these variables more often, set them permanently.
The directory %LIBRARY_DIR%\ALUT\bin contains libalut.dll; this DLL must always be in the search path when you run an ALUT-using application.
  • Install ALUT:
cabal install alut

Additional software

  • StateVar: This package contains state variables, which are references in the IO monad, like IORefs or parts of the OpenGL state
  • OpenAL 3D sound software
  • OpenGL 3D graphics software

An alternative to ALUT might be OALWrapper