Building for Windows

Building on Windows Systems

Contents

  1. Requirements for OpenAMQ on Windows
  2. Specify the IBASE Directory
  3. Set Your PATH
  4. Choose a Build Model
  5. Unpack the Source Code
  6. Build the Packages
  7. Test the Server
  8. Windows Build FAQ

1. Requirements for OpenAMQ on Windows

  • Windows 2000 or newer
  • Microsoft Visual C/C++ 6.x or Visual Studio .NET 2003 7.1
  • 1 gigabyte of available disk space
  • A standard unzip tool (note: WinZip does not handle the tar.gz files correctly).

The C/C++ compiler must be configured for command-line compilation. To test this, open a console window and type this command:

> cl /?

If the command shows help for the MSVC compiler, it has been configured correctly. Otherwise follow these instructions:

  • During MSVC installation, make sure you register the environment variables needed for command-line use of the compiler.
  • Check the vcvars32.bat script for correctness.
  • When you open a console box, the MSVCDir variable must point correctly to the MSVC application directory.
  • You can set this manually in the system environment variables.

Note that Visual Studio 2005 (including the Express Edition) is not currently supported.

2. Specify the IBASE Directory

The OpenAMQ libraries and executables are installed into the directory defined by the environment variable IBASE (the common base for all iMatix products).

Define IBASE using a command following this example:

> set IBASE=c:\ibase

You can add this command to your server environment so that you do not need to retype it in each shell window.

3. Set Your PATH

To correctly access the OpenAMQ executables, you must place the IBASE\bin directory on your path. Do this using this command:

> set PATH=%IBASE%\bin;%PATH%

You can add this command to your server environment so that you do not need to retype it in each shell window.

4. Choose a Build Model

From the same OpenAMQ source kit you can build many variations of the software:

  • single-threaded, useful for single-core servers (st).
  • multi-threaded, ideal for servers with two or more cores (mt).
  • with full debugging information (debug).
  • optimised, without debugging information (release).

The default build is mt,release. To choose a different build, set the BOOM_MODEL environment variable following this example:

> set BOOM_MODEL=mt,debug

You can add this command to your server environment so that you do not need to retype it in each shell window.

5. Unpack the Source Code

After downloading the OpenAMQ source kit, move it to a working directory with sufficient disk space and then unpack the source code using these commands:

> unzip \path\to\OpenAMQ-1.2c4.zip
> cd \path\to\OpenAMQ-1.2c4

6. Build the Packages

After setting IBASE, your PATH, and BOOM_MODEL, build the software using this command, in the OpenAMQ-1.2c4 directory:

> build

7. Test the Server

After a successful build, start the server as follows:

> amq_server
OpenAMQ/1.2c4
Production release
Copyright (c) 2007 iMatix Corporation
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2006-05-09 10:12:41: W: security warning - console login uses default password
2006-05-09 10:12:42: I: server ready for incoming AMQ connections

And in a second window, start the test client as follows:

> amq_client

The client will create a temporary queue on the server, send a single message to its own queue, and read the message back off its queue. To stop the server, press Ctrl-C.

More information: Running Your Server

8. Windows Build FAQ

  • ? Answer: