MathGroup Archive 2006

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

Search the Archive

Mathlink and Builder C++

  • To: mathgroup at
  • Subject: [mg70770] Mathlink and Builder C++
  • From: "Jean-Noel.Aubertot" <Jean-Noel.Aubertot at>
  • Date: Fri, 27 Oct 2006 00:28:06 -0400 (EDT)
  • References: <ehmu5d$sf7$>

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 
C:\Program Files\Wolfram 
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,


  • Prev by Date: Re: DownValues and Cases
  • Next by Date: Re: CovarianceMatrix Function
  • Previous by thread: Proving sign of cross partial
  • Next by thread: binary units to units package