|
Getting Up and Running |
||
|---|---|---|
|
|
||
|
|
||
You may obtain the right to use KAI C++ by purchasing a license from Kuck & Associates, Inc. or by taking part in an evaluation program. The rights you have varies with the type of license you obtain.
Perpetual, annual, and evaluation licenses use the same licensing method on this platform. The license codekey must be in the environment variable KCC_LICENSE when the KCC command is invoked.
| Bourne-Shell | KCC_LICENSE=license-codekey-here | |
|---|---|---|
| C-Shell | setenv KCC_LICENSE license-codekey-here |
Perpetual, annual, and evaluation licenses use the same licensing method on these platforms. The license information comes as two parts: a license serial number and a license codekey. These values must be in the environment variables KAI_SERIAL and KAI_CODEKEY (respectively) when the KCC command is invoked.
| Bourne-Shell |
KAI_SERIAL=license-serial-number KAI_CODEKEY=license-codekey-here |
|
|---|---|---|
| C-Shell |
setenv KAI_SERIAL license-serial-number setenv KAI_CODEKEY license-codekey-here |
On Sun Sparc and IBM RS/6000 systems, the KCC license is managed by FLEXlm 5.0b license manager by GlobeTrotter.
Using a FLEX demo license does not require starting the license manager. A single line in a file contains all the necessary information. The line should look something like this
FEATURE KAI/C++ KAIlmd 3.000 26-oct-1996 0 EB38F001A3B650D615A1 "K007200" 72400424
To load a permanent license for KAI C++ you need to create
a license information file and start the license manager. These
instructions assume that you have already installed KAI/C++ and
are in directory KCC_BASE/. The license information
you will receive consists of 3 lines, which will look something
like this:
SERVER dagger 12345 8518DAEMON KAIlmd path-to-bin-directoryFEATURE KAI/C++ KAIlmd 3.000 13-nov-1996 0 DBE81001C96AA2463449 "K008500" 12345
First, the three license data lines should be placed in a file named "license.dat" in the KCC_BASE directory. Please note that the line beginning with "DAEMON" is incomplete. The string 'path-to-bin-directory' should be replaced with the root path to the installation directory 'KCC_BASE/bin'.
When these lines have been completed and inserted in the "license.dat" file you must start the licensing daemons with the command:
$cwd/bin/lmgrd -c $cwd/license.dat >&! $cwd/lmgrd.log &
If you already have FLEXlm licensing running on this machine
you may want to merge this data into a multi-application file.
If you do this, you should replace the default license file path
in KCC_BASE/bin/KCC. The line:
LM_LICENSE_FILE=${LM_LICENSE_FILE-$KPP_BASE"/license.dat"}
should be changed so that LM_LICENSE_FILE is assigned the absolute path to the merged license file. For additional information, see the Globetrotter end user web page or contact Kuck & Associates, Inc..
The simplest way to invoke KAI C++ is the following:
KCC hello.C
This command compiles and links the program hello.C .
KCC recognizes options common to most UNIX C/C++ compilers such
as -c and -o.
When compiling object files, use the +K0 option when debugging, and use the +K3 -O options for better performance. The +K options control front-end optimization, which are language-specific optimizations. The -O options control back-end optimization, which are architecture-specific optimizations. Using front-end optimizations without the back-end optimizations is usually pointless. Front-end optimization levels above +K1 can significantly increase compilation time. Depending upon your coding style and machine, the higher levels may not help at all or may speed up your code by better than 2x. You will have to experiment to find out.
KAI C++ is link compatible with other C compilers. KAI C++ is not link compatible with other C++ compilers. This means that all of the C++ code in your program must be compiled with KAI C++.