Home | Previous Page | Next Page   Creating User-Defined Routines > Developing a User-Defined Routine > Compiling a C UDR >

Compiling Options

Use the C compiler to compile a C UDR. Include the following compiler options:

UNIX/Linux Only

On UNIX or Linux, the following sample command compiles the C UDR in the abs.c source file:

/compilers/bin/cc -I $INFORMIXDIR/incl 
   -I $INFORMIXDIR/incl/esql -c abs.c

cc -KPIC -DMI_SERVBUILD -I$INFORMIXDIR/incl/public \
-I$INFORMIXDIR/incl -L$INFORMIXDIR/esql/lib -c abs.c
End of UNIX/Linux Only

At runtime:

LB_LIBRARY_PATH=/opt/informix/lib:/opt/informix/lib/esql
Windows Only

The following command is a sample of how to compile a C UDR named abs.c for Windows:

cl /DNT_MI_SAPI /DMI_SERVBUILD 
-Id:\msdev\include -Id:\informix\incl\public 
-Id:\informix\incl -c abs.c
End of Windows Only
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]