MathGroup Archive 2006

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

Search the Archive

Mathlink


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**, char*):
error: '_fstrncpy' undeclared (first use this function)
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
http://userpages.umbc.edu/~mrao1


  • Prev by Date: Comparison of Mathematica on Various Computers
  • Next by Date: Re: Number-Theory :: All-Digit Perfect Squares
  • Previous by thread: Re: Comparison of Mathematica on Various Computers
  • Next by thread: Re: Mathlink