User`s guide

110
K
A
DAK
KwikNet System Construction
3.4 Compiling Application Modules
In order to compile an application C source file, say MYFILE.C, which makes use of
KwikNet services, the following KwikNet header files must be present in the Treck
installation directory C:\TRECK\INCLUDE. These files will be copied there, if not already
there, whenever a
KwikNet Library is built. You must define the path to these header files
using compiler switches or environment variables acceptable to your compiler.
KN_LIB .H KwikNet Library Header File
KN_API .H KwikNet Application Interface definitions
KN_COMN .H KwikNet Common Interface definitions
KN_OSIF .H KwikNet OS Interface definitions
KNZZZCC .H KwikNet compiler specific definitions
KN_SOCK .H KwikNet Socket Interface definitions
Header file KN_LIB.H is a copy of your KwikNet Library Header File from your KwikNet
library directory. This file is created as a byproduct of the KwikNet Library construction
process described in Chapter 3.3.
Header files KN_API.H, KN_COMN.H and KN_OSIF.H are the KwikNet files with which all
application modules must be compiled. Any module which includes KN_LIB.H will
automatically include these header files as well. These files will be found in KwikNet
installation directory INCLUDE.
Header file KNZZZCC.H is the compiler specific file which will be found in KwikNet
installation directory TOOLXXX, where XXX is KADAK's mnemonic for a particular
vendor's C tools.
Header file KN_SOCK.H must be included by all applications which use TCP or UDP
socket services.
If source file MYFILE.C makes calls to RT/OS service procedures, you must also have
access to all of the required RT/OS header files.
You must also have access to your C library header files so that
KwikNet header files can
reference them.
With these header files in place, your application module MYFILE.C is ready to be
compiled. If you are using
KwikNet with AMX, the procedure is exactly as described in
the toolset specific chapter of the AMX Tool Guide. If you have ported KwikNet using
your own software development tools, the procedure will be the same as you used to
compile the sample program source files.
Note
The make files for the sample programs provided with
KwikNet and its optional components compile all of the
modules which make up the sample program.