MathGroup Archive 1999

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

Search the Archive

Re: Mathlink : Problem in debugging from VC++.

  • To: mathgroup at
  • Subject: [mg16847] Re: Mathlink : Problem in debugging from VC++.
  • From: Jens-Peer Kuska <v-jkuska>
  • Date: Thu, 1 Apr 1999 21:35:21 -0500
  • Organization: Wolfram Research, Inc.
  • References: <7dpsg8$>
  • Sender: owner-wri-mathgroup at

Hi Mukund,

I use Borland C and can't help you with the VC++ stuff.
But you need not debug the MathLink librarys! The librarys
have not produced bugs in your program.
If you have written a C function

double foo(double x)
{ int i;

  i=0; /* first statement in this function, Break point here !!*/
  // usefull statements here....

place a break point at the first executable statment of the
function you will debug. 

Run the program with the (only) argument

myfooprog -linkcreate

(typical this has to be defined in your project settings). Your
program will show you a box like

Link 1234 at mypc created

Remenber this link name (1234 at mypc) and press the OK button, 
in your Mathematica session type

foolink=Install[LinkConnect["1234 at mypc"]]

A link object will be the result. At *first* check


than call your Mathematica equivalent of the C-function


switch to the debugging session and you can step by step
debug the double foo(double x)-function.

By the way - if I have to debug a MathLink I switch to a
unix box and use printf() statments in a terminal window.

Hope that helps

Mukund Swaminathan wrote:
> Hi Mathgroup,
>   I am having difficulties in getting to debug the mathlink code.
> I included the dll file that is supposed to contain debugging
> information.
> Also used version 3 revision 6 of mathlink for windows. I'd like
> help from a mathlink expert (or hacker).
>  I use VC++ 6.0. The debugger starts debugging, except it says
> can't debug into external dlls.
> any help is appreciated
> Thank you
> Mukund Swaminathan

  • Prev by Date: Re: Convolution Integrals
  • Next by Date: Re: New position: MathLink Developer
  • Previous by thread: Re: Re: question about entering vectors by the keyboard
  • Next by thread: Re: New position: MathLink Developer