Building client applications using MSVC on Windows

Summary

This tutorial explains how to build OpenAMQ client applications using MSVC on Windows.

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

rating: +2+x

Author

  • Martin Sustrik <moc.xitami|kirtsus#moc.xitami|kirtsus>
page tags: windows