Plug-in generation

At several locations within the TRAX 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:
   trxfct [-l<lib>] [-L<ldir>] [-I<idir>] [-D<define>] [-U<undef>] [-64] [-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 trax-64.


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


  1.    trxfct -eTRXEvalUsr myfct
    compiles the source file myfct.c, creates the loadable executable myfct and assigns it the entry point trxevalusr.

Example for a source file.

Last updated: M.Kraemer,
$Id: trxfct.html,v 1.6 2016/03/02 14:34:15 kraemer Exp $

Impressum Data privacy protection