Setting up your C++ programming environment

Requirements for C++ code development

The C++ extensions provided by IBM Director use a number of different compilers and versions because of the multitude of platforms that IBM Director supports. In order to interface with specific extensions, you will need to use the correct header files for a specific platform and to link with the correct libraries for that platform.

The following table describes all of the include file subdirectories provided by the IBM Director SDK:
Subdirectory Name Contents
inc Contains include files that are common to all platforms. These files will compile conditionally based on which platform and compiler are used.
inc_w32 Contains include files that are specific to all 32-bit Windows operating systems supported by Director, specifically Windows NT 4.0, Windows 95, Windows 98, and Windows 2000.

The following table describes all of the subdirectories provided by the IBM Director SDK that contain libraries with which your extensions will need to link:
Subdirectory Name Contents
lib_w32 Contains link libraries that are specific to 32-bit Windows operating systems. These libraries were built using the Microsoft 32-bit C++ Optimizing Compiler Version 4.2
lib_w32.bor Contains link libraries that are specific to 32-bit Windows operating systems. These libraries were built using the Borland C++ Version 4.52 Compiler.
lib_nov Contains link libraries that are specific to the Novell operating system. These libraries were built using the Watcom C/C++ V10.6 compiler.
lib_jav Contains jar files for the Java portion of the SDK.

The IBM Director SDK also contains some include files and library files which were not shipped as part of the IBM Director product. The files included in this SDK are:

TWGSdEvt.h and TWGSdEvt.lib
Used to link your application to TWGSdEvt.dll. These files are described in Creating and Sending an Event.

Sample code overview

Several of the samples provided contain code that demonstrates extension development for multiple platforms. This code is split among several subtrees, one for each platform, under that sample's base directory. This sample code will be labeled according to the platform and/or compiler required. Let's review the naming convention used so that you know what code is for what platforms.

The 32-bit Windows samples are found in subtree w32. These samples are coded to build with the Microsoft 32-bit C++ Optimizing Compiler Version 4.2 or 5.0. If you compile the 32-bit Windows samples with Microsoft C++ Version 6.0, you should define the compiler switch NO_STRICT to turn off strict type checking. This will permit compatible linking with the libraries provided in this SDK. The makefiles provided with the C++ samples define NO_STRICT.

All of the Java source code for the samples is sorted differently from the C++ code because of the package naming feature of Java. All of the Java source for the samples can be found under the samples\javasrc directory.

Executable files included with this SDK

The executable files included in this SDK are:
twgsvcee.exe
Creates an ini file for registering a task service with an IBM Director Agent. This file is described in Creating and Registering an Agent Service.
All utilities and all class files that are referenced and not described previously are included with IBM Director.