Re: mathlink beginner problem
- To: mathgroup at smc.vnet.net
- Subject: [mg32915] Re: [mg32885] mathlink beginner problem
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Tue, 19 Feb 2002 02:29:52 -0500 (EST)
- Organization: JEOL (USA) Ltd.
- References: <200202181022.FAA14878@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Borut L wrote: > Hi, > > 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 addtwo.tm -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! > I haven't used MathLink under Windows 2000 does it have the mcc program? If so the mcc -o addtwo add.c addtwo.tm should work not gcc. If you must use gcc you have to include the external files to be linked with in the command, the specifics should be in the documentation in the Help Browser under Add-Ons/Mathlink Library/System-Specific/(your OS here).
- References:
- mathlink beginner problem
- From: "Borut L" <gollum@email.si>
- mathlink beginner problem