For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > October 2006 > Mathlink and Builder C++









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Mathlink and Builder C++
Jean-Noel.Aubertot

2006-10-30, 7:43 pm

Dear all,
I am trying to use MathLink for the first time. I am trying to link
Mathematica with C code compiled with Borland C++ Builder 6.0 under Windows XP.

I have a problem to create a .exe file to be called from Mathematica. I
tried to follow the manual:
I created a .tm file (the same as the one described in the manual) that was
preprocessed using mprep. It created a .c file. In the options of my
Builder project, I added the following directories:
C:\Program Files\Wolfram
Research\Mathematica\5. 2\AddOns\MathLink\DeveloperKit\Windows\C
ompilerAdditions\mldev32\lib
C:\Program Files\Wolfram
Research\Mathematica\5. 2\AddOns\MathLink\DeveloperKit\Windows\C
ompilerAdditions\mldev32\include.
I had to add a "main{}" in this file in order for Builder C++ to compile
it. It worked fine: the c code is compiled, the header Mathematica.h seems
to be found correctly, but the linker indicates unresolved external
MathLink functions ("MLConnect", "MLFlush", "MLPutInteger", ...).

Does anyone have an idea where these MLfunctions are defined? Did I used
the correct directories? More generally, do you have an idea on how I could
compile the file automatically produced by mprep?

Any indication would be highly appreciated!

Best regards,

JN


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com