summaryrefslogtreecommitdiff
path: root/README.windows
diff options
context:
space:
mode:
Diffstat (limited to 'README.windows')
-rw-r--r--README.windows85
1 files changed, 85 insertions, 0 deletions
diff --git a/README.windows b/README.windows
new file mode 100644
index 0000000..33c8f06
--- /dev/null
+++ b/README.windows
@@ -0,0 +1,85 @@
+# rabbitmq-c and Windows
+
+rabbitmq-c can now be built on Windows using the MinGW/MSYS ports of
+the GNU toolchain and miscellaneous utilities. This includes the
+example programs and tools.
+
+The results are native Windows DLLs and EXEs, and can be used without
+having MinGW installed. But the librabbitmq header files currently
+use GCC extensions, and for this reason it is still not possible to
+use Microsoft's C/C++ to build applications against the librabbitmq
+DLL. Hopefully this will get fixed before long.
+
+
+# Building rabbitmq-c
+
+rabbitmq-c is built on Windows using MinGW and MSYS. In brief, MinGW
+is a native port of the GNU toolchain to Windows; MSYS is a set of
+ports of common GNU utilities to run under Windows, so that typical
+autotools-based builds will work there. MinGW/MSYS can be used to
+build native Windows applications and DLLs, which do not depend on
+MinGW/MSYS to run.
+
+So to build rabbitmq-c on Windows, you need to download and install
+the relevant parts of MinGW/MSYS. This can be fairly time consuming -
+there are dozens of files to be downloaded and unpacked. To make it
+easier, we provide a bash script that automates this process, in
+rabbitmq-c/etc/install-mingw.sh. You can run this under cygwin, or
+under Linux and copy the results over or put them on a shared drive.
+Some MinGW packages are .tar.lzma files, so it requires a system with
+the xz compression utility and a tar that supports the -J option.
+
+Run install-mingw.sh specifying the destination directory, e.g.
+
+ $ etc/install-mingw.sh mingw
+
+Python is needed for the rabbitmq-c build, so you will also need to
+install python under Windows. The Windows installer from python.org
+will do fine.
+
+You will need to copy the source code for rabbitmq-c and
+rabbitmq-codegen somewhere under your mingw directory.
+
+Open a cmd window, and ensure that both the MinGW bin directory and
+the python install directory are in the path, e.g.
+
+ C:\>set PATH=%PATH%;C:\mingw\bin;C:\Python26
+
+Then start bash, and run the following mount command (substituting the
+Windows path of your MinGW install):
+
+ C:\>bash
+ bash-3.1$ mount 'C:\mingw' /mingw
+
+Then go to the rabbitmq-c directory. If you got the rabbitmq-c
+directory from Mercurial (which is the only way to get it at the
+moment), you will need to run autoreconf to produce the configuration
+scripts:
+
+ bash-3.1$ autoreconf -i
+
+This will produce a few lines of informational output while it runs,
+but as long as it doesn't mention any errors, you are ok.
+
+Finally, configure and make:
+
+ bash-3.1$ ./configure && make
+ [...]
+
+
+# Running the tools without mingw
+
+You can run the resulting tools EXEs without the rest of MinGW. To do
+this, copy the following files into a directory:
+
+- rabbitmq-c/tools/.libs/*.exe
+
+- rabbitmq-c/librabbitmq/.libs/librabbitmq-0.dll
+
+- /bin/libpopt-0.dll
+
+- /bin/libiconv-2.dll
+
+- /bin/libintl-8.dll
+
+