Creating a shared-object file on UNIX or Linux

About this task

To create a shared-object file on UNIX™ or Linux™:

Procedure

  1. Load the abs.o object file into the abs.so shared library, as the following example shows:
    /compilers/bin/cc -K abs.o -o abs.so
    
    ld -G abs.o -o abs.so
  2. Put the shared library in a directory on which user informix has read permission and set the permissions to 755 or 775 so that only the owner can write to the shared libraries.
    # ls -ld /usr/code
    drwxr-xr-x 12 informix devel 2560 Feb 25 05:27 /usr/code 
    # chmod 775 /usr/code/abs.so
    drwxrwxr-x 12 informix devel 2560 Feb 25 05:27
       /usr/code