Re: mathlink & MS Visual C++ 6.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg15100] Re: mathlink & MS Visual C++ 6.0*From*: kevinl (Kevin Leuthold)*Date*: Sat, 12 Dec 1998 03:59:02 -0500*Organization*: Wolfram Research, Inc.*References*: <73d383$i9g@smc.vnet.net> <74aipi$455@smc.vnet.net> <74o0me$48k@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

"Michael Ringor" <mringor at laf.cioe.com> writes: >Kevin: Will there be a new version of mprep that will be compatible > with VC++6? Michael, 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: http://www.wolfram.com/support/MathLink/Updates/mathlink.h.html Kevin Leuthold MathLink Group Wolfram Research