Getting Started with Netxx

Building Netxx


The following instructions will show you how to compile Netxx on most
platforms.

Building on Unix

To build Netxx from the command line of a Unix-like operating system you
use the configure.pl perl script. There are various command line options
that can be given to configure.pl to change various compile time settings.
You should begin by reviewing the available options by running ./
configure.pl --help.

Once you know which command line options you want to give to configure.pl
you can run it. First, it will check your build environment to verify that
you have the proper tools to build Netxx. After that, it will generate the
make-files for your system. When configure.pl is done you can run the make
program to build Netxx.

After Netxx is built, you can install the library and header files. This is
done with the make program and the install target.

Building on MacOS X

Building Netxx on MacOS X is similar to building it on Unix. You can follow
the instructions for building on Unix if you wish. Either way, you need to
install the Developer Tools from Apple.

There is a shell script in build/macosx called configure.sh. When you run
that script the configure.pl perl script will be run with some good default
values. After it is finished, you can build Netxx using the make program.

Building on Windows

The following instructions apply to users of Microsoft Visual Studio. If
you want to build Netxx under cygwin, follow the directions for building on
Unix.

There is a MSVC workspace file in build/msvc that can be used to build
Netxx on Windows. Open the Netxx.dsw workspace file. Once the workspace is
loaded, pull down the Build menu and choose the Batch Build... menu item. A
dialog box will appear, click the Rebuild All button.

Learning the Netxx API

The fastest way to learn how to use Netxx is to review the included example
programs. Netxx comes with many simple and easy to understand example
programs such as an echo client/server and daytime client/server.

For complete API reference, you should take a look at the class reference
appendix of the Netxx manual or the doxygen generated web pages. Even with
these resources, the best place to hang out is in the Netxx header files.

Linking with Netxx

At some point you are going to need to link with the Netxx library. If you
are on a Unix-like operating system you can use the Netxx-config shell
script. This script can be used to give command line options to your
compiler and linker.

It also provides a way to abstract yourself from the operating system. Some
operating systems require you to link TCP/IP enabled applications with a
socket library. The Netxx-config script will automatically supply the
correct libraries to the linker, including the OpenSSL library if
necessary.

The Netxx-config script can also be helpful to figure out the version of
the installed Netxx library. There is also a little hint in the version
string, if it ends with -TLS you know it is safe to use the Netxx::TLS
interface on this platform.

