Build ACE Development Enviroment
Many documents and the http://www.cs.wustl.edu/~schmidt/ACE-install.html have very detailed introduction of how to build ace package.
I will give a guidline of building ace development enviroment in this file.
My own development enviroment is using Windows XP and Vstudio7.0 (2003)
(1) Download ace package to the local machine.
Available download url: http://download.dre.vanderbilt.edu/
(2) Uncompress the ACE distribution into a directory, where it will create a ACE_wrappers directory containing the distribution. ACE_ROOT is the path of ACE_wrappers directory.
e.g I uncompress the ACE package to the root of D disk. So set the ACE_ROOT enviromental variable equal to D:/ ACE_wrappers. ACE_ROOT = D:/ ACE_wrappers.
(3) Create a file called config.h in the ACE_ROOT/ace directory that contains
#include "ace/config-win32.h"
(4) The static, DLL and MFC library builds are kept in different workspaces. Files with names *_Static contain project files for static builds. Workspaces for static and DLL builds will be available through the stock release at DOC group's website. The workspaces for MFC are not available and have to be generated using MPC. Please see MPC's README for details.(As the workspaces for MFC is a little complicated, so there I will focus on the static and dll libraries building and use these libraries to develop C++ program)
(5) Load ACE_ROOT/ACE.sln
(6) Building the ACE.
(7) Static version of ACE libraries are built with ACE_AS_STATIC_LIBS defined. This macro should also be used in application projects that link to static ACE libraries.Optionally you can also add the line
#define ACE_NO_INLINE
before the #include statement in ACE_ROOT/ace/config.h to disable inline function and reduce the size of static libraries (and your executables.)
(8) ACE DLL and LIB naming scheme:We use the following rules to name the DLL and LIB files in ACE when using MSVC.
"Library/DLL name" + (Is static library ? "s" : "") + (Is Debugging enable ? "d" : "") + {".dll"|".lib"}
Create a test project using ACE.
Brief description of this test project:
An Acceptor creates listening port, and accepts a connection. Use local url: “127.0.0.1”.
A Connector connects to acceptor and it will get some words from the acceptor.
(9) Create 2 Win32 console project using VS7.1 in one solution workspace. Refer to the source code at the end of this file.
(10) Set projects’ properties.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
testAcceptor.h
testAcceptor.cpp
testConnector.h
testConnector.cpp