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: debugging MathLink executables


  • To: mathgroup@smc.vnet.net
  • Subject: [mg10438] Re: debugging MathLink executables
  • From: kevinl@wolfram.com (Kevin Leuthold)
  • Date: Tue, 13 Jan 1998 02:07:35 -0500
  • Organization: Wolfram Research, Inc
  • References: <69cp5k$eq7@smc.vnet.net>


Michael,

You don't give any details about your executable, so I'll describe how
to debug the sample MathLink programs addtwo and factor.

factor is straightforward to debug - just build a debug version of
factor, put a breakpoint somewhere in factor.c (right-click on a line,
and chose Insert/Remove Breakpoint), and start your program.

With addtwo, you'll have to connect addtwo and the kernel in listen-
connect mode, rather than having Mathematica launch addtwo.  To do
this,  first build addtwo.  Now put a breakpoint somewhere in addtwo,
let's say  in the function addtwo, at the line that says 'return i+j;',
and then  start your program.  You'll get a dialog box that says
"Create Link:". You can choose the name of your link here, or type "0"
(the number zero,  without the quotes), and MathLink will create the
name for you.  Let's  say you chose the name "foo".  Go to Mathematica,
and evaluate

link = Install["foo", LinkMode -> Connect] AddTwo[2,3]

Your program should break at the breakpoint you set.

I hope this helps.

Kevin Leuthold
MathLink Group
Wolfram Research


In article <69cp5k$eq7@smc.vnet.net>, mgh@world.std.com says...
> I'm trying to debug a MathLink executable that I've built. I'm on
> Windows NT, using Visual C++ 4.2. Has anyone had any experience with
> this?
> 
> --
> ------------------------------------------------------------------------
> 
> Michael Herstine
> mgh@world.std.com
> ------------------------------------------------------------------------
> 
> 
> 
> 



  • Prev by Date: RE: Why doesn't this work ?
  • Next by Date: RE: Why doesn't this work ?
  • Prev by thread: debugging MathLink executables
  • Next by thread: Re: debugging MathLink executables