- To: firstname.lastname@example.org
- Subject: [mg12126] Re: MathLink
- From: email@example.com (Kevin Leuthold)
- Date: Mon, 27 Apr 1998 01:46:10 -0400
- Organization: Wolfram Research, Inc.
- References: <firstname.lastname@example.org>
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 <email@example.com> 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/