Re: mathlink & MS Visual C++ 6.0
- To: mathgroup at smc.vnet.net
- Subject: [mg15009] Re: mathlink & MS Visual C++ 6.0
- From: kevinl (Kevin Leuthold)
- Date: Sat, 5 Dec 1998 01:30:13 -0500
- Organization: Wolfram Research, Inc.
- References: <73d383$i9g@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I had a private email conversation with John regarding the problem he described, and want to share with the whole group my answer to him since it may be of interest to anyone else compiling MathLink programs with Visual C++. John was giving mprep-generated code a .cpp extension, rather than a .c extension. In other words, instead of mprep addtwo.tm -o addtwotm.c he was typing mprep addtwo.tm -o addtwotm.cpp Unfortunately, mprep generates code that fails to compile under the stronger type checking that Visual C++ performs on .cpp files. This probably should be considered a bug in mprep. Fortunately, there is a simple workaround, which is to always give mprep-generated code a .c extension rather than .cpp. Of course, this would mean that any C++ code in a .tm file would have to be taken out and put in a .cpp file. Other than this bug that John has pointed out, there are no known problems with building MathLink programs using Microsoft Visual C++ 6.0. Kevin Leuthold MathLink Group Wolfram Research John Gore <gore_john at bah.com> writes: >I just moved to Vis C++ 6.0 from 4.0 and cant get my mathlink programs >to compile. > I have problems with the MLInitializeIcon routine produced by mprep. I >get errors from a lack of casting on structs HINSTANCE and HBRUSH >This happens even in the addtwo example. >Anyone using MS Vis C++ 6.0 ? >Im using Mathematica 3.01 >Current version of Mathlink as Downloaded Windows 95 >Thanks - JG
- Follow-Ups:
- Re: Re: mathlink & MS Visual C++ 6.0
- From: MJE <evans_nospam@gte.net>
- Re: Re: mathlink & MS Visual C++ 6.0