This document provides some information pertaining to the Windows version of Pure, available from the Pure website in the form of an MSI package. Please note that the Windows version has a custom directory layout which is more in line with standard Windows applications, and will by default be installed in the standard Program Files directory on your system.
You can use the Pure interpreter to create native executables by running it with the -c option. To make this work on Windows, you need to install the LLVM toolchain for mingw32/x86, available from the LLVM download page. Only the LLVM binaries package is required. For your convenience, here is the corresponding download for the LLVM 2.5 release: LLVM Binaries for Mingw32/x86.
The installer assumes that you unpack this tarball in the root directory of your C: drive, so that the tools end up in C:\llvm-2.5, and sets up PATH accordingly. If you put them elsewhere or if you’re using the toolchain from a newer LLVM version then you’ll have to change PATH accordingly.
Finally, the Pure program directory needs to be added to the gcc LIBRARY_PATH environment variable, so that some Windows-specific addon libraries are found when linking compiled programs. This should be done automatically during installation as well. However, because of differences in filename conventions the result might not always be what you want, so you should check the value of LIBRARY_PATH after installation and edit it as needed.
This release also includes the pure-gen utility, which can be used to create Pure interfaces to C libraries from the corresponding C headers.
To make this work, you also need to have gcc installed; pure-gen uses this as its C preprocessor. gcc 4.3 or later is required. We recommend using the latest gcc version (gcc 4.4, at the time of this writing) from the mingw project. Instructions for installing mingw gcc 4.4 can be found here. There’s an installer program available at the mingw website which helps you to set up a working mingw installation on your system. Jiri Spitz’ instructions for setting up mingw for Pure may also be helpful.
pure-gen assumes that a suitable gcc version is on your PATH. If this is not the case then you can also set the PURECPP environment variable to point to the executables of a suitable gcc installation so that pure-gen finds the correct gcc program. (For instance, if you have installed gcc-4.4 under C:\gcc-4.4 then you should set PURECPP to C:\gcc-4.4\bin.)