MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MathLink/CodeWarrior problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4071] Re: MathLink/CodeWarrior problem
  • From: mwfong at std.sri.com (Martin Fong)
  • Date: Fri, 31 May 1996 01:33:43 -0400
  • Organization: SRI International
  • Sender: owner-wri-mathgroup at wolfram.com

Elizabeth J Earhart (earhart at athena.mit.edu) wrote:

>  I've been trying to get MathLink to work with CodeWarrior 8 on the
>  Macintosh.  I have the Metroworks MathLink file available from the
>  Technical Support area on the WRI web page.  When I try to compile
>  the provided project files, I get two link errors.  One is the
>  "'__minf__' referenced from 'get_real_by_string_conversion' is
>  undefined" error that is mentioned in the Technical Support area,
>  and the suggested fix of adding the line "short __minf__[5] =
>  {32767,0,0,0,0};" works to remove it.  The other error is "exit.c:
>  'RemoveConsole' referenced from '_exit' is undefined."  Is there a
>  similar fix for this error?  I can't even find exit.c to look at
>  the reference.

I suspect that you need to include the appropriate SIOUX (viz.,
console) MW library.  I also overcame these problems, but encountered
the following, which I sent to Wolfram as a bug report:

 Per Stephen Wolfram's "Mathematica," Second Edition, page 508, the
 following should be an acceptable method of invoking MLMain ():

     #include "mathlink.h"

	 void
     main (int argc, char **argv)

     {
	 MLMain (0, (char **) 0L);
     }

 However, upon initialization, MLOpen () dies on an implicit call to
 strcmp () (strcmp () appears to have been passed a NULL address).
 Based upon the calling chain, it appears that MLOpen () is evaluating
 the command line arguments, of which there are none and none should be
 necessary.  The following is the calling chain:

     main (MLMain (0, (char **) 0L);)
     MLMain (mlp = MLOpen( argc, argv);)
     MLOpen
     MLOpenInEnv
     argv_to_open_parameters
     argv_to_open_parameters
     strcmp

 N.b.: MLOpen () also fails in the same fashion with the following
 invocation:

     #include "mathlink.h"

	 void
     main (void)

     {
	 int     argc   = 1;
	 char   *argv[] = {"sobol", (char *) 0L};


	 MLMain (argc, argv);
     }

 Thus, what command line arguments are necessary to satisfy MLMain ()'s
 MLOpen () call?  Thank you.

Unfortunately, I've not received a reply from them.  Thus, I'd
appreciate anyone's insight into circumventing this problem.

     Thanks!

     ...Martin Fong			mwfong at std.sri.com

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: The Mathematica Journal-Supplements
  • Next by Date: deconvolution programm
  • Previous by thread: MathLink/CodeWarrior problem
  • Next by thread: Printing of Notebooks