Hi,
AFAIK MathLink does not work with GCC. Get the free Borland C/C++ 5.5
compiler if you like an command line.
Regards
Jens
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!
>
> Thank You for Your help,
>
> Borut Levart