Building the Tests and Examples
Building on Linux or UNIX
If the boost directory (e.g. the directory called boost_1_33_0)
is in the same directory as the asio source kit, then you may configure
asio by simply going:
./configure
in the root directory of the asio source kit. Note that configure will
always use the most recent boost version it knows about (i.e. 1.33.0) in
preference to earlier versions, if there is more than one version
present.
If the boost directory is in some other location, then you need to
specify this directory when running configure:
./configure --with-boost=<BOOSTDIR>
When specifying the boost directory in this way you should ensure that
you use an absolute path.
To build, simply run make in the root directory of the asio
source kit. To test that asio is working correctly, run make
check after a successful build.
Building on Win32
Building with MSVC
To build using the MSVC 7.1 or MSVC 8.0 command line compiler, perform the
following steps in a Command Prompt window:
-
If you are using a version of boost other than 1.33.0, or if the boost
directory (i.e. the directory called boost_1_33_0) is not in
the same directory as the asio source kit, then specify the location of
boost by running a command similar to set
BOOSTDIR=path_to_boost. Ensure that you specify an absolute
path.
-
Change to the asio src directory.
-
Execute the command nmake -f Makefile.msc.
-
Execute the command nmake -f Makefile.msc check to run a suite
of tests to confirm that asio is working correctly.
Building with Borland C++
To build using the Borland C++ Builder 6 command line compiler, perform
the following steps in a Command Prompt window:
-
If you are using a version of boost other than 1.33.0, or if the boost
directory (i.e. the directory called boost_1_33_0) is not in
the same directory as the asio source kit, then specify the location of
boost by running a command similar to set
BOOSTDIR=path_to_boost. Ensure that you specify an absolute
path.
-
Change to the asio src directory.
-
Execute the command make -f Makefile.bor.
-
Execute the command make -f Makefile.bor check to run a suite
of tests to confirm that asio is working correctly.
Building with MinGW
To build using the MinGW g++ compiler from the command line, perform the
following steps in a Command Prompt window:
-
If you are using a version of boost other than 1.33.0, or if the boost
directory (i.e. the directory called boost_1_33_0) is not in
the same directory as the asio source kit, then specify the location of
boost by running a command similar to set
BOOSTDIR=path_to_boost. Ensure that you specify an absolute
path using forward slashes (i.e.
c:/projects/boost_1_33_0 rather than
c:\projects\boost_1_33_0).
-
Change to the asio src directory.
-
Execute the command make -f Makefile.mgw.
-
Execute the command make -f Makefile.mgw check to run a suite
of tests to confirm that asio is working correctly.