MathGroup Archive 1998

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

Search the Archive

Re: mathlink & MS Visual C++ 6.0

"Michael Ringor" <mringor at> writes:

>Kevin:  Will there be a new version of mprep that will be compatible
>            with VC++6?


I hope the following will answer your question and help clear up any
other misconceptions MathLink users might have about MathLink and C++.

(1) mprep is compatible with VC++6 in all known situations, except for
the case that the original poster reported: if the mprep-generated file
is given the .cpp extension instead of the .c extension.  There is a
simple workaround to this problem that should work for all users:  give
all mprep-generated files the .c extension (and move any C++-specific 
code in .tm files to another file).

This will not affect most users, since the standard instructions for
building a MathLink program are to give mprep-generated files a .c 
extension.  (Although it is quite a reasonable expectation that it
should work with a .cpp extension).

(2) I have filed this problem as a bug report, and we will look into
fixing it in a future version of mprep.

(3) The only other known problem with MathLink and C++ is that the
mathlink.h header file does not have extern "C"{} wrapped around all of
its function declarations.  There are 2 things users can do about this:
	(a) wrap all #include "mathlink.h" lines with extern "C"{}
	(b) download a copy of mathlink.h where this problem is fixed at:

Kevin Leuthold
MathLink Group
Wolfram Research

  • Prev by Date: Global max for a nonlinear function
  • Next by Date: Output Leading up To Answer?
  • Previous by thread: Re: mathlink & MS Visual C++ 6.0
  • Next by thread: BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?