English

How To: Compile ArcSDE C API programs on UNIX

Summary

Instructions provided describe how to compile the ArcSDE C API programs layer_test.c and util_lib.c into an executable called layer_test.

layer_test.c
<a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25525' target='_blank'>[O] layer_test.c</a>
util_lib.c
<a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25528' target='_blank'>[O] util_lib.c</a>
util_lib.h
<a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25529' target='_blank'>[O] util_lib.h</a>

Procedure

  1. Install the ArcSDE client. In this example the ArcSDE client is installed into the directory /esri3/users/test/sdehome.
  2. Set the environment variable SDEHOME to point to this directory:
    setenv SDEHOME /esri3/users/test/sdehome
  3. Set the platform specific library path variable to the $SDEHOME/lib directory.

    SUN, TRU4 & LINUX :
    setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:$SDEHOME/lib

    AIX :
    setenv LIBPATH $LIBPATH:$SDEHOME/lib

    HP-UX :
    setenv SHLIB_PATH $SHLIB_PATH:$SDEHOME/lib
  4. Compile the ArcSDE C API program using a standard C compiler. The build options are specific to each platform and the type of executable (32 or 64 bit) required. The following shell scripts list the build options for each platform.

    Sun 32 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25549' target='_blank'>[O] Sun_32_compile.sh</a>
    Sun 64 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25550' target='_blank'>[O] Sun_64_compile.sh</a>
    AIX 32 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25544' target='_blank'>[O] AIX_32_compile.sh</a>
    AIX 64 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25547' target='_blank'>[O] AIX_64_compile.sh</a>
    HPUX 32 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25552' target='_blank'>[O] HPUX_32_compile.sh</a>
    HPUX 64 Bit shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25553' target='_blank'>[O] HPUX_64_compile.sh</a>
    Linux shell script :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25554' target='_blank'>[O] Linux_64_compile.sh</a>
    Compaq Tru64 shell script:
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25555' target='_blank'>[O] tru64_compile.sh</a>

    Alternatively, you can use the GNU make utility and the attached makefile and options files.

    GNU makefile :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25556' target='_blank'>[O] CAPI_makefile</a>
    Sun 32 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25557' target='_blank'>[O] SunOS_32.opt</a>
    Sun 64 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25558' target='_blank'>[O] SunOS_64.opt</a>
    AIX 32 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25559' target='_blank'>[O] AIX_32.opt</a>
    AIX 64 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25560' target='_blank'>[O] AIX_64.opt</a>
    HPUX 32 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25561' target='_blank'>[O] HPUX_32.opt</a>
    HPUX 64 bit :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25562' target='_blank'>[O] HPUX_64.opt</a>
    Linux :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25563' target='_blank'>[O] Linux.opt</a>
    Compaq Tru64 :
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/25565' target='_blank'>[O] OSF1.opt</a>