COMPILING AND SETTING UP UNIX NETWORK PROGRAMMING (UNP) LIBRARY
To develop
their automated traders in an external machine, you need to install the UNP
communication library provided by Richard Stevens' Unix Network Programming
book. The source code can be found at:
http://www.kohala.com/start/unpv12e/unpv12e.tar.gz
We assume you saved the file in a directory that we refer to as UNPV_DIR. After that, the user can use the command (to unzip and untar in the current directory):
tar -xvzf unpv12e.tar.gz
That should create a directory unpv12e
in UNPV_DIR, and uncompress all the necessary files inside
it.
The next step is to compile the network library without errors. Here
is Stevens' original compilation notes together with other comments added
to ease up the compilation process.
QUICK AND DIRTY (Originally by Richard Stevens, edited by PLAT Team)
Once you are inside UNPV_DIR,
cd unpv12e
./configure # try to figure out all
implementation differences
cd lib # build the basic
library that all programs need
make # use "gmake" everywhere
on BSD/OS systems
If you are unable to compile using '
make' (the last step above), then follow the
modifications suggested below and try again. The exact nature of the
modifications needed might differ from one configuration to another.
Below are general tips from our crux installation. After you change
something in the UNP source code, we recommend you execute '
make clean' before calling 'make' again to be certain that your changes are fully incorporated.
NOTES ON UNP INSTALLATION ON CRUX
The following are the particular changes we needed to make for the UNP
installation on crux (UNPV_DIR=/usr/local):
- Commented out a structure because it was a redefinition of
a structure which was in the system's include libraries, with one extra
field: (UNPV_DIR/unpv12e/lib/unp.h

|