MathGroup Archive 1998

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

Search the Archive

Re: MathLink


There are a number of reasons why it may not be working:

(1) If there are any spaces in your path name (including the arguments
you're passing your program), you need to put single quotes around
them.   Otherwise MathLink will not know when the name of your program
ends and  when the next argument (to MLOpen) begins.  

(2) You're using single backslashes in your path name - you need to
quote those backslashes, otherwise if you did something like

MLOpenArgv( ep, "-linkmode launch -linkname 'C:\foo -mathlink'", &err);

MathLink would get the filename as "C:\foo", and would interpret the
file has having 5 characters, the third character being '\f' instead of
'\\' as you probably intend.

So to launch MathKernel using MLOpenString, you would do something like

MLOpenArgv( ep, 
	"-linkmode launch -linkname 'C:\\Program Files\\Wolfram
Research\\Mathematica\\3.5\\MathKernel -mathlink'", &err);

Kevin Leuthold
MathLink Group
Wolfram Research

Zahnd Beat <> writes:

>I'm writing a programm who calls Mathematica. For starting the Kernel I
>use MLOpenArgv() it works fine. But when I use MLOpenString() nothing
>works. What is the corrct String when MathKernel ist locatet at
>'D:\Programme\...\3.0\MathKernel'? I have tried "-linkname
>D:\Programme\...\3.0\MathKernel -mathlink" but it didn't work.

>Beat Zahnd
>Engineering School Biel


  • Prev by Date: Re: 1+Cos[x]Cosh[x]==0 ?
  • Next by Date: Calculating eigenvector for zero eigenvalue
  • Prev by thread: Re: MathLink
  • Next by thread: For MathGroup