TRiP98 plug-in generation


At several locations within the TRiP98 package it is possible to use external "plug-ins". These are user-supplied C-functions with a defined parameter list, compiled and linked in a special way (For specialists: the functions are prepared to be called as if they were part of a dynamic shared library). In order to facilitate the compile and link step a shell script is provided:
trpfct [-l<lib>] [-L<ldir>] [-I<idir>] [-64]  [-pre2kx] [-e<entrypoint>] <src>
where <src> is the C source file name (without extension), <lib> is an optional user library name, <ldir> is an optional user library directory, <idir> is an optional user include directory. <entrypoint> is the name of the entrypoint, it is this name with which the plug-in can be called at run time. If omitted the name of the source file is assumed. The actual name must be chosen as required by the application (see functions)
-64 has to be chosen when the plug-in is intended for use with the 64-bit version TRiP98-64.
-pre2kx must be used for the legacy version (TRiP98-pre2kx).

Remark

For plug-ins generated via trpfct to load properly, in most UNIX environments the current directory must be included in the shared library path, if not provided by default in your account's profile:
   export         LIBPATH=.:$LIBPATH          # AIX
   export      SH_LIBPATH=.:$SH_LIBPATH       # HP-UX
   export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH  # Linux, Solaris, Tru64, ... 

Example

  1. trpfct ctnum
    
    compiles and links the source file ctnum.c and assigns it the entry point ctnum.
  2. trpfct junkct -ectnum
    
    compiles and links the source file junkct.c and assigns it the entry point ctnum.

Last updated:
$Id: trip98trpfct.html,v 1.7 2014/05/28 13:55:10 kraemer Exp $
M.Kraemer@gsi.de