MathGroup Archive 2002

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

Search the Archive

mathlink beginner problem

  • To: mathgroup at
  • Subject: [mg32885] mathlink beginner problem
  • From: "Borut L" <gollum at>
  • Date: Mon, 18 Feb 2002 05:22:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at


I am feeling very depressed after I'd spent a full day with MathLink and
having had no success. Please help.

I use windows 2000 with Mathematica 4.0.
I installed the free gcc compiler MinGW.
Before moving on a real problem, I tough trying out a simple exercise would
be a wise idea. I copied mathlink.h into /include and mprep into /bin. Then
I tried to compile the addtwo.c (with .tm) from Todd Gayley's tutorial to
MathLink like this:

mprep -o add.c
gcc -o add add.c (this should make an executable out of a source, with
source being preprocessed template file, if I understand this correctly)

Then, ugly thing went over the screen, many of them, all like the two below:

C:\DOCUME~1\bonaro\LOCALS~1\Temp\ccuYaaaa.o(.text+0x18e):add.c: undefined
reference to `GetStockObject@4'
C:\DOCUME~1\bonaro\LOCALS~1\Temp\ccuYaaaa.o(.text+0x2ae):add.c: undefined
reference to `MLGetInteger@8'

(C:\DOCUME~\... is my temp dir)

I tried various other approaches, but nothing worked. Nothing!

Thank You for Your help,

Borut Levart

  • Prev by Date: Re: Mathematica for Mac OS X vs. 9?
  • Next by Date: RE: Odd results in integration
  • Previous by thread: Re: Solve/Reduce and assumptions
  • Next by thread: Re: mathlink beginner problem