wsprep

preprocesses the WSTP template file , and generates C code that contains all the necessary WSTP code to call C functions from the Wolfram Language.

Details

  • wsprep processes .tm template files that describe interfaces between Wolfram Language functions and C functions. These interfaces allow the Wolfram Language to call the C functions from within the Wolfram System runtime.
  • wsprep generates the necessary set of C WSTP API function calls to communicate with the Wolfram Language kernel automatically. Users can take the C code generated by wsprep, compile it and link it with the rest of their C program. The resulting program is suitable for use with Install.
  • wsprep supports the following command-line options:
  • -prototypesenable use of ANSI C function prototypes (default)
    -noprototypesdisable use of ANSI C function prototypes for compilers that do not support ANSI C prototypes
    -linesenable recording of source line and source file location in output C file
    -nolinesdisable recording of source line and source file location in output C file
    -h filenameuse the contents of filename as custom header code in the output C file rather than the default header code produced by wsprep (use with care)
    -t filenameuse the contents of filename as custom trailer code in the output C file rather than the default trailer code produced by wsprep (use with care)
    -o filenamewrite output to the file named filename
    -j filenameread a list of filenames from filename and process each file in batch mode
  • With , entries from the template files will be preceded by # line line-number "sourcefile".