C Samples

Compiling the Sample Programs

The sample programs will need to be compiled prior to use.

NOTE   A third-party C software compiler, such as Microsoft Visual C++, must be installed before performing these steps.

To compile under Windows

1.Set the CPROVDIR environment variable to point to your installation.

C:\>set CPROVDIR=C:\Program Files\SafeNet\Protect Toolkit 5\Protect Toolkit C SDK

2.Use the nmake program to compile the examples.

C:\Program Files\SafeNet\Protect Toolkit 5\Protect Toolkit C SDK\samples\demo>nmake
To compile under UNIX

1.Create a temporary compile directory.

% mkdir SafeNet  

2.Copy the sample program and Makefile into that directory.

% cp /opt/safenet/protecttoolkit5/ptk/src/demo/* SafeNet 

3.Modify the Makefile to point to your installation directory.

CFLAGS=-I/opt/safenet/protecttoolkit5/ptk/include -I/opt/safenet/protecttoolkit5/ptk/src/include 
LDFLAGS=-L/opt/safenet/protecttoolkit5/ptk/lib

4.Use the make program to build the demo.

% make