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

MathGroup Archive 1997

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

Search the Archive

Re: MathLink, MS Visual C++ 5.0: running in debugger

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9085] Re: [mg9040] MathLink, MS Visual C++ 5.0: running in debugger
  • From: jpk at max.mpae.gwdg.de
  • Date: Mon, 13 Oct 1997 23:33:02 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Ray,

I don't work with Vi$ula C++ from Micro$oft.  But with Mathlink 3.0
the following will with Borland C

a) start Your Mathlink client with
   td32 mymlprog -linkcreate 
   
b)  Set breakpoints in the function You want to debug.
    execute mymlprog in the debugger until the message box
    with the link name appears say the link is "1234 at nthost". 
    
c) In your Mathematica session do    

   link=Install[LinkConnect["1234 at nthost"]]
   
   and call the function from Mma

   DoAnyCalculation[1,2,3]
   
d) thanks to the breakpoint the debugger stops and when Your function
   is called and You can look for the errors.
 
Hope that helps.

Jens   
   
> I apologize in advance if this is either a stupid or frequently-asked
> question. But I'm stumped.
> 
> How does one execute an external MathLink program from Mathematica while
> watching it perform in the MS Visual C++ 5.0 debugger?
> 
> I read the documentation in the MathLink Developers Kit (for Win NT 4.0 and
> Vis C++ 5.0) and tried the command
> 
>  LinkOpen["foo", LinkProtocol->"FileMap", LinkMode->Listen]
> 
> The problem is that I don't know how to launch the app in the Vis C++ IDE's
> debugger, and pass _both_ the arguments to the external procedure _and_ the
> switches "-linkname foo -linkprotocol FileMap -linkmode connect" in the
> main() arg list. There must be some way to establish a peer-to-peer
> connection between Mathematica and the debugger, but I can't figure it out.
> 
> If you could shed light on this problem (using, say, the trivial addtwo
> example shipped with MathLink), I would be very grateful.
> --
> Ray Beausoleil
> Hewlett-Packard Laboratories
> mailto:beausol at hpl.hp.com
> 
> 
> 
> 
> 


  • Prev by Date: Integrating piecewise functions
  • Next by Date: Re: Re: Useful Dumb User Questions
  • Previous by thread: MathLink, MS Visual C++ 5.0: running in debugger
  • Next by thread: notebook autosave in 3.0?