Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

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



  • Prev by Date: Triangles and trigonometry
  • Next by Date: BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?
  • Previous by thread: Re: Triangles and trigonometry
  • Next by thread: Re: Re: mathlink & MS Visual C++ 6.0