MathGroup Archive 2006

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

Search the Archive

Re: Mathlink

  • To: mathgroup at
  • Subject: [mg64294] Re: Mathlink
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Fri, 10 Feb 2006 02:13:31 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <dsetls$jgp$>
  • Sender: owner-wri-mathgroup at


AFAIK MathLink will work with Borland C/C++ (free Personal edition,
Visual Studio (the free Visual Studio Express Edition
Open Watcom C/C++ 
compilers. But it will not work with Cygwin and you should try
one of the compilers above -- none  costs money for personal use.


"M. Prabhakar Rao" <mrao1 at> schrieb im 
Newsbeitrag news:dsetls$jgp$1 at
| Hello:
| I have a question regarding MathLink. The basic 
idea is to be able to
| access a function written in C via Mathematica. 
I followed the procedure
| illustrated in the Mathematica Book. I wrote a 
template file for the
| function and used mprep to generate 
corresponding .c file. However, when
| I compile this .c file to generate the 
executable, I get the following
| error:
| In fuunction 'int _MLMain(char**, char**, 
| error: '_fstrncpy' undeclared (first use this 
| error: (Each undeclared identifier is reported 
only once for each function
| it appears in.)
| When I look at the .c file generated by mprep, 
the function _fstrncpy is
| declared as follows:
| #if WIN32_MATHLINK && !defined(_fstrncpy)
| #  define _fstrncpy
| #endif
| System Information:
| I am running Mathematica on a laptop under 
Windows XP. Since I do not have
| Microsoft Visual Studio, I am using cygwin to 
write all my code in C.
| Please help.
| Best regards,
| Prabhakar Rao
| -- 
| M. Prabhakar Rao, Ph.D.
| Department of Mechanical Engineering
| University of Maryland Baltimore County

  • Prev by Date: Re: Comparison of Mathematica on Various Computers
  • Next by Date: Re: Digital Image Processing: showing graylevel images in
  • Previous by thread: Mathlink
  • Next by thread: XMLElement and XMLObject docs