Re: MathLink
- To: mathgroup@smc.vnet.net
- Subject: [mg12411] Re: MathLink
- From: kevinl@wolfram.com (Kevin Leuthold)
- Date: Thu, 14 May 1998 11:15:21 -0400
- Organization: Wolfram Research, Inc.
- References: <6j3itu$clg@smc.vnet.net>
Hello,
It depends on how you want to connect to the kernel. For example, if
you want your program to launch the kernel, you can do something like
this (let's say your program is named factor and reads in the arguments
at the commandline):
factor -linkmode launch
That will open a browser and you can choose the kernel from that
browser. Or if you want to avoid a browser, something like this:
factor -linkmode launch -linkname "C:\Program Files\Wolfram
Research\Mathematica\3.0\MathKernel.exe"
If you want to connect to a link that you've already opened in the
kernel (let's say it's called mylink), you can do it like this:
factor -linkmode connect -linkname mylink
For any of the examples above, you can create an array of arguments that
correspond to the commandline arguments. For example, for the first
example, you could do this:
char* argv[] = {"-linkmode", "launch", 0};
link = MLOpenArgv( env, argv, argv+2, &err);
I hope this helps.
Kevin Leuthold
MathLink Group
Wolfram Research
"G. Schultes" <GSchultes@t-online.de> writes:
>I would like to call "Mathematica 3.0 Win 95" functions from Visual C++
>user interface.The informaton I could get from the Official System
>Guide Book didn`t help me to cope with the problem.The command
>"MLOpenArgv" cannot affect a link to the Kernel.Which "argv- array" is
>here nessecary? Who has an idea and can help me? Gerd Schultes