summaryrefslogtreecommitdiff
path: root/README.windows
blob: 33c8f06934e74d44b8b8e2941cf6d13d9b5f0983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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