MathGroup Archive 1996

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

Search the Archive

Re: MathLink in C++

  • Subject: [mg3129] Re: MathLink in C++
  • From: evans at (Mark Evans)
  • Date: 7 Feb 1996 04:43:26 -0600
  • Approved:
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: GTE Intelligent Network Services, GTE INS
  • Sender: daemon at

In article <4ept6f$jk0 at>, sherod at boussinesq.Colorado.EDU
(Scott Herod) wrote:

> I'm trying to learn to use MathLink at the some time I'm trying
> to learn C++.  Anyway, on our sparc20 running Solaris2.3 I am having
> trouble with the mprep routine.  It appears that we have mprep
> version 2.2.2 which accepts a -prototypes flag but which by no means
> is writing code which our C++ or g++ will compile.
> Is there a more recent version of mprep for Suns which can write 
> C++ or should I give up on C++ for awhile?
> Scott Herod

This may not help, but remember to declare all the MathLink calls "extern
C" so that the compiler and linker will know how to treat them.

MathLink expects to call C functions, not C++ functions.  Much of the
functionality of C++ arises from behind-the-scenes compiler maneuvers, so
that, for example, function names become something other than what you
declared them to be.

Just something to check.

Mark Evans

  • Prev by Date: Re: MathLink in C++
  • Next by Date: help
  • Previous by thread: Re: MathLink in C++
  • Next by thread: Line and Surface Integrals