next up previous contents 5
Next: Installing the dcs_tcl_packages library Up: Installing the libraries Previous: Installing the newmat10 library   Contents


Building the tcl_clibs library

This is a library of C functions that TCL is able to load.

  1. Install newmat10 library .

  2. Install the jpegsoc library.

  3. Checkout the tcl_clibs software into the /usr/local/dcs directory.

    blctlxx:/usr/local/dcs > cvs checkout tcl_clibs
    cvs checkout: Updating tcl_clibs
    cvs checkout: Updating tcl_clibs/decunix
    U tcl_clibs/decunix/makefile
    cvs checkout: Updating tcl_clibs/irix
    U tcl_clibs/irix/makefile
    U tcl_clibs/irix/tcl_clibs.so
    cvs checkout: Updating tcl_clibs/linux
    U tcl_clibs/linux/calibrate.so
    U tcl_clibs/linux/makefile
    cvs checkout: Updating tcl_clibs/src
    U tcl_clibs/src/calibrate.c
    U tcl_clibs/src/calibrate.h
    U tcl_clibs/src/ice.c
    U tcl_clibs/src/ice_auth.c
    U tcl_clibs/src/ice_auth.h
    U tcl_clibs/src/ice_cal.c
    U tcl_clibs/src/ice_cal.h
    U tcl_clibs/src/image_channel.c
    U tcl_clibs/src/image_channel.h
    U tcl_clibs/src/tcl_macros.h
    U tcl_clibs/src/wedge.c
    U tcl_clibs/src/wedge.h
    

  4. cd into the linux, decunix, or irix build directory.

    blctlxx:/usr/local/dcs > cd tcl_clibs/linux/

  5. Copy the 3rd party newmat10 library files into the /usr/local/dcs/ directory.

    blctlxx:/usr/local/dcs > ls -R newmat10/
    newmat10/:
    linux
    
    newmat10/linux:
    boolean.h   include.h    myexcept.h  newmat.h    newmatnl.h  newmatrm.h  solution.h
    controlw.h  libnewmat.a  newmatap.h  newmatio.h  newmatrc.h  precisio.h  tmt.h
    blctlxx:/usr/local/dcs >
    

  6. Build the software with the make command.

    blctlxx:/usr/local/dcs/tcl_clibs/linux > make
    g++ -c -O -DLINUX -I./ -I../ -I/usr/local/include/  -I../../auth/src -I../../xos/src/  -I/usr/lib/ -I../../jpegsoc//src ../src/ice.c
    g++ -c -O -DLINUX -I./ -I../ -I/usr/local/include/  -I../../auth/src -I../../xos/src/  -I/usr/lib/ -I../../jpegsoc//src ../src/ice_cal.c
    g++ -c -I../../newmat10/linux/ ../src/calibrate.c
    ../src/calibrate.c: In function `int cal_convolutegaussian 
    (ColumnVector &, ColumnVector &, double)':
    ../src/calibrate.c:205: warning: assignment to `int' from `double'
    ../src/calibrate.c:205: warning: argument to `int' from `double'
    g++ -c -O -DLINUX -I./ -I../ -I/usr/local/include/  -I../../auth/src -I../../xos/src/  -I/usr/lib/ -I../../jpegsoc//src ../src/ice_auth.cg++ -c -O -DLINUX -I./ -I../ -I/usr/local/include/  -I../../auth/src -I../../xos/src/  -I/usr/lib/ -I../../jpegsoc//src ../src/wedge.c
    g++ -c -O -DLINUX -I./ -I../ -I/usr/local/include/  -I../../auth/src -I../../xos/src/  -I/usr/lib/ -I../../jpegsoc//src ../src/image_channel.c
    ../src/image_channel.c: In function `int image_channel_load (void *, 
    Tcl_Interp *, int, char **)':
    ../src/image_channel.c:353: warning: passing NULL used for non-pointer 
    argument passing 2 of `xos_semaphore_wait (xos_semaphore_t *, long 
    int)'
    ../src/image_channel.c:353: warning: argument to non-pointer type `long 
    int' from NULL
    g++ -shared ice.o ice_cal.o calibrate.o ice_auth.o wedge.o image_channel.o ../../jpegsoc/linux/jpegsoc_applack.a ../../newmat10/linux/libnewmat.a  ../../auth/linux/auth.a  ../../xos/linux/xos.a /usr/lib/libjpeg.a -lc /usr/lib/libtcl8.3.so  -lm -lpthread -o tcl_clibs.so
    

  7. Test the library by loading it from the tcl prompt and manually calling a provided procedure. (This also tests the newmat10 library build.)

     
    smblx5:~> wish
    % load /usr/local/dcs/tcl_clibs/linux/tcl_clibs.so dcs_c_library
    % cal_find_peak 5 "1 2 3 4 5" "1 2 3 2 1"
    3.000000e+00 3.000000e+00
    % exit
    



Scott McPhillips 2002-10-10