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.
Normally, most things should be set up properly after you installed the MSI package, but here are a few things that you should know when running the Windows version:
Optional Bits and Pieces
The Windows package contains all that’s needed to run Pure programs with the interpreter. However, in order to be able to run the Pure batch compiler and to make full use of the Pure/C interface on Windows, you may need to install some third-party programming tools:
mingw is a full version of the GNU C/C++ compiler for Windows systems. You’ll need this in order to create native executables and libraries with the Pure batch compiler. It is also needed for running the pure-gen utility included in this package, which can be used to create Pure interfaces to C libraries from the corresponding C headers. And, last but not least you can also use mingw to compile the LLVM tools and the Pure interpreter yourself, if you prefer that.
Using mingw 4.4 or later is recommended. There’s an installer available at the mingw website, see http://www.mingw.org/wiki/Getting_Started for details. You’ll want to install both the C/C++ compilers and the MSYS environment. You’ll also have to modify the PATH environment variable so that it points to the directory containing the mingw binaries, usually c:\mingw\bin.
The batch compiler also requires the LLVM toolchain for mingw32/x86, available from the LLVM download page. In addition, in order to use the C/C++ code inlining feature of the Pure interpreter, you’ll need an LLVM-enabled C/C++ compiler such as clang. (That’s pretty much the only option on Windows right now; at the time of this writing, the dragonegg plugin for gcc hasn’t been ported to Windows yet.)
This Pure release has been built and tested with LLVM 3.1, so that is the version that you should get. For your convenience, here is the direct download link of the binary package which contains both the LLVM toolchain and the clang compiler:
http://llvm.org/releases/3.1/clang+llvm-3.1-i386-mingw32-EXPERIMENTAL.tar.bz2
You should unpack this tarball (using, e.g., 7-Zip) to a directory on your harddisk (say, c:\llvm), and modify the PATH environment variable so that it points to the bin subdirectory of this folder.
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, but it’s a good idea to check the value of LIBRARY_PATH after installation and edit it as needed.