Home | Previous Page | Next Page   Programming DataBlade Module Routines in C > Compiling DataBlade Module Code >

Compiling on UNIX

On UNIX platforms, you use the generic ProjectU.mak makefile. This makefile 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.

The makefile requires the INFORMIXDIR environment variable to be set to the Informix database server installation directory. The BINDIR variable in the makefile determines where the shared object file or dynamic link library is written.

BladeSmith creates server, all, and clean targets in the makefile. The server target builds the shared object file. The clean target deletes the shared object file or dynamic link library. The default all target is equivalent to the server target.

Important:
Generate code in BladeSmith with the Format property set to UNIX. If you generate code for a UNIX DataBlade module with the DOS file format, you must convert the files to UNIX format before compiling.
To compile and link your DataBlade module shared object file
  1. Copy the generated src/c directory and all of its contents to your UNIX machine.
  2. To compile and link shared objects on a Sun Solaris 2.5 computer using the SPARC compiler, execute the following command at the C shell:
    setenv TARGET $INFORMIXDIR/incl/dbdk/makeinc.solaris
    make -f ProjectU.mak

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

Important:
For compiling information specific to your operating system, see your machine notes.

Unresolved Symbols (IDS 9.14)

When you link on UNIX, the system displays a list of unresolved symbols. This list can contain these types of unresolved symbols:

Compiling with Debug Support

To debug your DataBlade module while it executes in a database server process, you must build the shared object file with debugging symbols. You can either modify the makefile and add the required compiler flags to the CFLAGS variable, or set the COPTS variable on the make command line.

On Solaris, the following commands build shared object files with debugging symbols from the C shell:

setenv TARGET $INFORMIXDIR/incl/dbdk/makeinc.solaris
make -f ProjectU.mak COPTS="-g -xs"
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]