MathGroup Archive 1998

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

Search the Archive

Re: MathLink


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12126] Re: MathLink
  • From: kevinl@wolfram.com (Kevin Leuthold)
  • Date: Mon, 27 Apr 1998 01:46:10 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6hpetr$de6@smc.vnet.net>

Hello,

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
this:

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

Kevin Leuthold
MathLink Group
Wolfram Research


Zahnd Beat <zahnb@student.isbiel.ch> 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
>Switzerland

>http://www.isbiel.ch/~zahnb/




  • 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