Compile the client executable

StepsCompiling the client on Windows

  1. Verify your setup as described in “Verify your environment”.

  2. Create a batch file with these commands and run it:

    SETLOCAL
    call %JAGUAR%\bin\setenv.bat
    set INCLUDE=.;%JAGUAR%\include;%INCLUDE%;
    set INCLUDE=%INCLUDE%;%JAGUAR_JDK13%\include;
    set INCLUDE=%INCLUDE%;%JAGUAR_JDK13%\include\win32
    set LIB=%JAGUAR%\lib;%LIB%
    cl /W3 /nologo /DWIN32 /Gd /GX -c arith.cpp
    set SYSLIBS=kernel32.lib advapi32.lib
    link /MAP /out:arith.exe arith.obj libjcc.lib libjutils.lib %SYSLIBS%
    ENDLOCAL
    

StepsCompiling the client on UNIX

  1. Verify your setup as described in “Verify your environment”.

  2. Create a shell script containing the commands for your platform from Table 3-2, then run the shell script.

  3. Change the script file permissions to allow execution, for example, assuming you have named the script compile.sh:

    chmod 777 compile.sh
    
    Table 3-2: Client compilation commands for UNIX platforms

    Platform

    Shell script

    Solaris

    This shell script works with the Solaris CC compiler, version 6.x:

    #!/bin/sh
    . $JAGUAR/bin/setenv.sh
    CC -DJAG_NO_NAMESPACE -z muldefs -I. -I$JAGUAR/include \
    -I$JAGUAR_JDK13/include -I$JAGUAR_JDK13/include/solaris \
    -L$JAGUAR/lib -ljcc -ljtml_r -ljtli_r -lunic -lnsl \
    -ldl -lthread -lm -ljutils -o arith arith.cpp
    

    If you use the version 4.x compiler, change -L$JAGUAR/lib to -L$JAGUAR/lib_sol4x.

    HP-UX

    This shell script uses the HP-UX ANSI C++ (aCC) compiler:

    #!/bin/sh
    . $JAGUAR/bin/setenv.sh
    aCC -c  +DA1.1 +DS2.0 +u4 -DNATIVE -D_HPUX -D_POSIX_C_SOURCE=199506L \
      -D_HPUX_SOURCE  -I $(JAGUAR_JDK13)/include -I $(JAGUAR_JDK13)/include/hp-ux \
      -I $(JAGUAR_JDK12)/include -I $(JAGUAR_JDK12)/include/hp-ux  -I. \
      -I$JAGUAR/include -L$JAGUAR/lib -lpthread -ljcc -lnsl -ljtml_r \
      -ljinsck_r -lunic -ljutils -o arith arith.cpp 
    

    HP Itanium

    This shell script uses the HP C++ (aCC) compiler:

    #!/bin/sh
    . $JAGUAR/bin/setenv.sh
    
    aCC -g +DD32 -mt -I$(JAGUAR_JDK13)/include -I$(JAGUAR_JDK13)/include/hp-ux \
    -I$(JAGUAR_JDK14)/include -I$(JAGUAR_JDK14)/include/hp-ux -I. \
    -I$(JAGUAR)/include -L$(JAGUAR)/lib -lpthread  -lunic -ljtml_r -ljinsck_r \
    -ljcc -lnsl -ljlog -o arith arith.cpp
    

    AIX

    This shell script uses the IBM native compiler:

    #!/bin/sh
    . $JAGUAR/bin/setenv.sh
    xlC_r  -g -c -DDEBUG -DJAG_NO_NAMESPACE -DAIX -D_AIX -qcpluscmt -qnoro \
      -qmaxmem=-1 -qarch=com -qtbtable=full  -I $(JAGUAR_JDK13)/include \
      -I $(JAGUAR_JDK12)/include -I. -I$JAGUAR/include  \
      -brtl -L$JAGUAR/lib -ljcc.so -lunic -ljtml_r.so -ljinsck_r.so \
      -lpthread -lnsl -ljutils -o arith arith.cpp
    

    Linux

    This shell script uses the g++ compiler:

    #!/bin/sh
    . $JAGUAR/bin/setenv.sh
    g++ -c -D_GNU_SOURCE=1 -DLINUX -D_LINUX -D_REENTRANT -fPIC \
      -fwritable-strings -pipe -g -DDEBUG -I $(JAGUAR_JDK13)/include \
      -I $(JAGUAR_JDK13)/include/linux -I $(JAGUAR_JDK12)/include \
      -I $(JAGUAR_JDK12)/include/linux  -I. -I$JAGUAR/include \
      -L$JAGUAR/lib -lpthread -ljcc -lnsl -ljtml_r -ljinsck_r \
      -l unic -ljutils -o arith arith.cpp