Re: linking C-program with Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg9389] Re: linking C-program with Mathematica
- From: "P.J. Hinton" <paulh>
- Date: Sun, 2 Nov 1997 01:02:20 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
Dominique Schreurs wrote: > > Hi, > > I would like to call own-developed C-programs from within Mathematica. > Can anyone give me a simple example ? Since I'm a relatively new user > of Mathematica, the explanation in the manual is not sufficiently clear > to me. 1) Make sure you know how your compiler works and verify that it is capable of linking against the MathLink libraries supplied by the MathLink Developer's Kit on the professional CD-ROM. 2) Go download a copy of "A MathLink Tutorial" by Todd Gayley at URL: Version 2.2 notebook (can be converted into 3.0) http://www.mathsource.com/MathSource/Enhancements/MathLink/0206-693/ML_Tut.ma PostScript document http://www.mathsource.com/MathSource/Enhancements/MathLink/0206-693/ML_Tut.ps It was written for MathLink under Mathematica 2.2, but the examples given therein should give you a more indepth starting point for creating MathLink executables. 3) Read over the system specific information in the MathLink Developer's Kit online documentation. 4) Play with the addtwo example in the Developer's Kit. It shows you how to turn an existing C program into an "installable" executable that can be called from the kernel. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. http://www.wolfram.com/~paulh/