Some info on how we have built the Windows package:

We use two separate Windows 7 64-bit VirtualBox VMs, one with 32-bit versions of GCC, IDL and python, and a second one with 64-bit counterparts of these. All work is done using a MSYS shell. In both cases the GCC compilers were packaged by the TDM-GCC project.

Compilation starts out as on Linux/Mac OS X...

  ./configure && make

... followed by:

  make windows

which will produce the python and IDL bindings, followed by running InnoSetup to create the installer package.

This procedure is heavily adapted to my own directory layout and will require considerable changes to get it working on your system.



Python bindings
===============

These were compiled using the TDM-GCC compiler for windows using a modified version of the xrlsetup.py file found in the python folder. The Cython bindings are also included (installed using pip).
The command we used:

python xrlsetup.py build_ext --inplace --compiler=mingw32

The produced _xraylib.pyd and xraylib_np.pyd files are of course dependent on the python version they were compiled against...
The package includes bindings for Python versions 2.7, 3.4 and 3.5.


----


IDL bindings
============

The IDL bindings for Windows were compiled using the MAKE_DLL procedure, callable from within IDL. Before executing the routine itself, we changed the !MAKE_DLL IDL system variable as follows:

!MAKE_DLL.COMPILER_NAME='GCC'
!MAKE_DLL.CC='gcc.exe %X -fPIC -I"C:\Program Files (x86)\ITT\IDL\IDL80\external\include" -c -D_REENTRANT %C -o %O'

It is important here NOT to change the value of !MAKE_DLL.LD

The MAKE_DLL command itself was:

make_dll,'xraylib_idl','libxrlidl','IDL_Load',INPUT_DIR='.',EXTRA_CFLAGS='-I"C:\Program Files (x86)\xraylib\Include"',EXTRA_LFLAGS='"C:\Program Files (x86)\xraylib\Lib\libxrl-3.lib" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib"',OUTPUT='.'

Depending on the versions of IDL, xraylib and Visual Studio that are installed, these commands may need to be altered.


----


.NET bindings
=============

The .NET Framework can be installed on computers running Microsoft Windows operating systems. It supports multiple programming languages, including C#, VB.NET, C++/CLI, Pascal, Fortran and includes a large class library for that solves many common programming problems. These bindings have been compiled using the free Visual Studio Community 2015 IDE from Microsoft (https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) and was built against .NET Framework Version 4. The binding consists of a single, mixed-mode assembly XrayLib.NET.dll written in C++/CLI. The assembly provides the interop between a managed XrayLib class and the native functions and types exposed by libxrl-7.dll. This combines the language interoperability of .NET with the performance of the native underlying functions. A pre-built Release version of the assembly and an example program can be found in the bin folder together with a HTML Help v1 file.

To use XrayLib.NET.dll in Visual Studio:

1)     Right-click on your project in the Solution Explorer

2)     Click the References... menu item

3)     Click the Add New Reference... button in the dialog box

4)     Click the Browse tab of the Add Reference dialog box

5)     Navigate to the xraylib Lib folder and select the XrayLib.NET.dll file

6)     Click the OK buttons to add the assembly reference and close the dialog boxes

7)     Assuming you are using C#, add the following line to the top of your source code file

using Science;

8)     To create a instance of the XrayLib class that provides access to the XrayLib functionality, use the make the following call

XrayLib xl = XrayLib.Instance;

The class uses the static property Instance to implement a singleton pattern so that only a single instance of the XrayLib class is created and can be used throughout your program.  
