MathGroup Archive 2001

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

Search the Archive

Re: Calling Mathematica-4.0 from C Code.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26667] Re: Calling Mathematica-4.0 from C Code.
  • From: Ulrich Hofstoetter <ulrich.hofstoetter at visualanalysis.com>
  • Date: Wed, 17 Jan 2001 00:47:20 -0500 (EST)
  • Organization: Visual Analysis
  • References: <93r8sn$4vp@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Chia-Wei Wang wrote:

> Hi,
>    I am trying to get familiar with MathLink, especially calling
> Mathematica from a C code. So I copy the example file from Todd Gayley's
> "A MathLink Tutorial" at Chapter 2. But the manual does not say how to
> compilie that code and excute it. I am using Sun Unix System. Could
> someone tell me what is the procedure to make that code work? Thank you
> very much.
>
> With Regards
> Chiawei
>
> ________________________________________________________________________


Create a Makefile that does the following:
1. create a c-file from the tm-file (mprep file.tm -o filetm.c)
2. compile the c-file to object files and link them
    gcc -IPathToMathlink.h -c file.c
    gcc -IPathToMathlink.h -c filetm.c
    gcc file.o filetm.o -LPathTolibML.a -l ML -o program

Check out the Help Browser (AddOns->MathLink Library -> System specific
Information).
or the Examples delivered with Mathlink
(PathToMathematica/AddOns/MathLink/DevelopersKists/Solaris(??)/MathLinkExamples)

Yours
Uli
--
Dipl.-Inf. Ulrich Hofstoetter
Visual Analysis GmbH
Neumarkter Str. 87
D - 81673 Munchen

Tel: (+49)89-431981-38
Fax: (+49)89-431981-1
e-mail: ulrich.hofstoetter at visualanalysis.com
www: http://www.visualanalysis.com




  • Prev by Date: Re: How can I transform the number of 123.456 into "123.456"?
  • Next by Date: Re: Partial Differential Equation
  • Previous by thread: Re: Calling Mathematica-4.0 from C Code.
  • Next by thread: Re: Calling Mathematica-4.0 from C Code.