Next: loadUser Up: User Function Help File Previous: compile_unix   Contents

compile_win

Usage:
Type userfunhelp(compile_win) for information on how to compile a user
  function for use with the Windows version of MacAnova.



Keywords: user functions, compiling
This topic provides some details about compiling a user function using
Borland C/C++ for use with the Windows version of MacAnova.

Set up the project to construct a 32 bit DLL.

Change the default Project Options as follows:
  Add WIN32 to the list of defines
  Set 32-bit Compiler Processor Data Alignment to Quad word (8 bytes).
  Set Resources Target Windows Version to Win32

In the source, add the modifier "_export" to the functions in the
project, as in
  void _export goo(double *x, double *y, long *n, double *result)
  long * _export goo_arginfo(void)

This will be accomplished automatically if you include header file
Userfun.h, and preface routine names with EXPORTED instead of _export.

Entry names will be prefixed by the compiler with '_'.  For this reason,
User("_foo", ... ) and User("foo", ... ) are equivalent.

Files goo.c and fooeval.c listed in topic c_macros are examples of user
functions that compile for Windows.


Gary Oehlert 2003-01-15