Developing on Windows

Note

This tutorial applies to OpenAMQ/1.3 and earlier versions, building with MSVC/2003 and earlier versions. For OpenAMQ/1.4 and MSVC/2008 and later, please see http://win.openamq.org.

Problem

Developers on Windows are accustomed to using the MSVC IDE. The OpenAMQ build system does not generate MSVC projects, so these have to be configured manually.

Explanation

This example assumes that you are using Microsoft Visual Studio .NET 2003. However, the same settings should also be accessible in Microsoft Visual Studio 6.0. We also assume that you have already built OpenAMQ.

  1. Create a new Project for your application.
  2. Add the directory pointed to by %IBASE%\include to your include directories (Project->Properties->Configuration Properties->C/C++->General->Additional Include Directories).
  3. Add the directory pointed to by %IBASE%\lib to your library directories (Project->Properties->Configuration Properties->Linker->General->Additional Library Directories).
  4. Select the appropriate Runtime Library to use, depending on the BOOM_MODEL setting you used to build OpenAMQ (Project->Properties->Configuration Properties->C/C++->Code Generation->Runtime Library). For example, if OpenAMQ is built with BOOM_MODEL=mt,debug, you should use the Multi-threaded Debug (/MTd) runtime. Note that the DLL runtime is not currently supported.
  5. Add the following libraries to your project (Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies):
libamq_common.lib
libamq_operate.lib
libamq_server.lib
libamq_wireapi.lib
libapr.lib
libaprutil.lib
libasl.lib
libgsl.lib
libgsl3.lib
libicl.lib
libipr.lib
libpcre.lib
libsfl.lib
libsmt.lib
libsmt3.lib
libzip.lib
ws2_32.lib
wsock32.lib
netapi32.lib
winmm.lib
oldnames.lib
mpr.lib
uuid.lib
rpcrt4.lib

Comments

Add a New Comment

Edit | Files | Tags | Source | Print

rating: +2+x

Author

Martin Sustrik <moc.xitami|kirtsus#moc.xitami|kirtsus>

All tutorials

Performance Tests: This tutorial explains how to do OpenAMQ performance tests using 0MQ performance testing framework.

Broker federation: How to setup a geographically distributed federation of OpenAMQ brokers and how to define dataflows between individual geographical locations.

The ESB cookbook: How to implement your own Enterprise Service Bus, step by step, using OpenAMQ.

Publishing contents: How to publish contents at high speed without bizarre memory issues.

Tuning OpenAMQ for low latency: How to tune your operating system and hardware to get the lowest latency, i.e. the best response times, from your OpenAMQ broker.

The mandatory and immediate flags: How to use the 'mandatory' and 'immediate' flags on the Basic.Publish method.

Load balancing: How to use OpenAMQ to distribute work between multiple applications, a technique called "load balancing".

Content based routing: How to route messages based on their header properties. It is a fast and simple way to do 'content based routing' without needing to inspect entire messages. We explain the principles and provide worked examples.

Transient or durable subscriptions: How to make subscriptions that are transient (come and go with their consuming applications) or durable (stay around).

The AMQ model: How the AMQ model works: this is a basic backgrounder for anyone starting to use OpenAMQ in their applications.

Developing on Windows: How to build OpenAMQ client applications using MSVC on Windows

Handling Ctrl-C in applications: How to properly detect an interrupt (Ctrl-C) and shut-down gracefully in C/C++ WireAPI applications.