INFORMIX
DataBlade Developers Kit User's Guide
Chapter 6: Creating ActiveX Value Objects
Home Contents Index Master Index New Book

Compiling Client and Server Projects

Among the code that BladeSmith generates in the src\ActiveX directory are the following makefiles and project files:

When you compile a server project, a ProjectS.bld file is created. When you compile a client project, a ProjectX.dll file is created.

This section describes how to compile both a server project and a client project.

Compiling a Server Project

To compile a server project, you must add the include and lib directories of your Informix database server to your makefile or project environment (be careful not to add Informix client libraries), and the INFORMIXDIR environment variable must be set to the Informix server installation directory.

Because BladeSmith does not generate tracing routines in the source code, projects are not built with tracing support. If you have added DataBlade API tracing routines to your code, you must add the instruction to compile with tracing support to your makefile or project file. For more information, see "Tracing and Error Handling".

Compiling a UNIX Server Project

For UNIX server projects, BladeSmith generates a ProjectU.mak file. There are two targets in the makefile: all and clean. The all target compiles the ProjectS.bld file. The clean target deletes the ProjectS.bld file and the link objects.

The ProjectU.mak makefile also includes platform-specific makefiles as files named makeinc.platform. To specify the UNIX platform, set the TARGET environment variable to the path and filename of the include file for your platform. Platform-specific files are located in the directory $INFORMIXDIR/incl/dbdk.

Before compiling the server project, check:

To compile a UNIX server project

    1. Copy the generated src\ActiveX directory and all of its contents to your UNIX computer.

    2. Execute the following command:

    To compile the project with debugging support, execute the following command:

    The ProjectS.bld file is created in the src/ActiveX/solaris-sparc directory.

Compiling a Windows NT Server Project

To perform this task, you must be logged on to Windows NT as a member of the Informix-Admin group.

For Windows NT server projects, BladeSmith generates a ProjectS.dsp file and a ProjectS.mak file. If you are using Visual C++ 5.0 or later, use the ProjectS.dsp file. (The makefile is useful for scripts or for command-line users; for example, a configuration management department might want to include the server project as part of a nightly build. For information on using this makefile, see "Compiling from the MS-DOS Command Prompt".)

The general process for compiling the project is:

    1. Set the include and library file directories in Microsoft Developer Studio.

    2. Compile the ProjectS.bld file.

    3. Mark the attributes of the ProjectS.bld file as read-only.

In your project, the \informix\incl\public directory must precede all other Informix include file directories. The \informix\lib directory must be included on the library file directories list.

Tip: These settings are global, so if you are compiling both the server and client projects using Visual C++, you must switch between these settings and those specified in "Compiling a Client Project". To avoid this situation, you can associate the settings on a project basis; for example, associate \informix\incl\public and \informix\lib with the server project.

To set the include files and library file directories

    1. In Microsoft Developer Studio Visual C++ 5.0, choose Tools Options.

    2. Click the Directories tab in the Options dialog box.

    3. Select Include files from the Show directories for list box.

    4. If the \informix\incl\public directory is not on the list, add it:

    a. Double click the last field in the list (which is empty).

    b. Click the browse button (...).

    c. Select the \informix\incl\public directory from the Open dialog box.

    d. Click OK.

    5. Select the \informix\incl\public directory.

    6. Click the Move Item Up button to relocate the directory above any other Informix include directories.

    7. Select Library files in the Show directories for list box.

    8. If the \informix\lib directory is not on the list, add it:

    a. Double click the last field in the list (which is empty).

    b. Click the browse button (...).

    c. Select the \informix\lib directory from the Open dialog box.

    d. Click OK.

    9. Click OK to exit the Options dialog box.

To compile a Windows NT server project

    1. Copy the src\ActiveX directory and all of its contents to the Windows NT machine on which an Informix server is installed.

    2. In Microsoft Developer Studio Visual C++ 5.0, choose File Open and open ProjectS.dsp.

    3. Choose Build Set Active Configuration.

    4. Select a version of the project in the Set Active Project Configuration dialog box:

    5. Click OK.

    6. Choose Build Rebuild All to compile.

Visual C++ creates a Release directory and a Debug directory under the src\ActiveX directory to hold the release version and the debug version, respectively, of the dynamic link library.

To mark the attributes of the resulting ProjectS.bld file as read-only, use Microsoft Windows Explorer to open the Properties dialog box for the file, and then check the Read-only check box. The Informix server cannot load a .bld file unless its attributes are set to read-only.

Compiling a Client Project

For Windows 95 and NT client projects, BladeSmith generates a ProjectX.dsp file and a ProjectX.mak file. If you are using Visual C++ 5.0 or later, use the ProjectX.dsp file. (The makefile is useful for scripts or for command-line users; for example, a Configuration Management department might want to include the client project as part of a nightly build. For information on using this makefile, see "Compiling from the MS-DOS Command Prompt".)

The general process for compiling a client project is:

    1. Set the include and library file directories in Microsoft Developer Studio.

    2. Compile the ProjectX.dll file.

To set the include files and library file directories

    1. In Microsoft Developer Studio Visual C++ 5.0, choose Tools Options.

    2. Click the Directories tab in the Options dialog box.

    3. Select Include files from the Show directories for list box.

    4. If the following directories are not on the list, add them:

    5. Select Library files in the Show directories for list box.

    6. If the following directories are not on the list, add them:

    7. Click OK to exit the Options dialog box.

Tip: These settings are global, so if you are compiling both the server and client projects using Visual C++, you must switch between these settings and those specified in "Compiling a Windows NT Server Project". To avoid this situation, you can associate the settings on a project basis; for example, associate \informix\incl\public and \informix\lib with the server project.

To compile a Windows 95 or NT client project

    1. In Microsoft Developer Studio Visual C++ 5.0, choose File Open and open ProjectX.dsp.

    2. Choose Build Set Active Configuration.

    3. Select a version of the project in the Set Active Project Configuration dialog box:

    4. Click OK.

    5. Choose Build Rebuild All to compile.

Visual C++ creates a Release directory and a Debug directory under the src\ActiveX directory to hold the release version and the debug version, respectively, of the dynamic link library.




DataBlade Developers Kit User's Guide, version 3.6
Copyright © 1998, Informix Software, Inc. All rights reserved.