MathGroup Archive 1998

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

Search the Archive

Re: Mathlink what is P(( ))


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11281] Re: Mathlink what is P(( ))
  • From: kevinl@wolfram.com (Kevin Leuthold)
  • Date: Wed, 4 Mar 1998 01:39:34 -0500
  • Organization: Wolfram Research, Inc.
  • References: <6dg6h7$2pd@smc.vnet.net>

JG,

I don't think the issues you are bringing up should affect link errors. 
Could you provide the link errors you are getting?  (and what platform
are you compiling on?)

The macro P is defined in mathlink.h - you can see its definition there.
Basically, assuming you have a modern C compiler that accepts
ANSI-style function prototypes, the line:

int addtwo P(( int, int));

will be processed to:

int addtwo ( int, int);

If you are using a pre-ANSI compiler, you will need to define the macro
MLPROTOTYPES to be 0 somewhere in your makefile or call to mcc, and
you'll want to get rid of any prototypes in addtwo.c (or update your
compiler).

Kevin Leuthold
MathLink Group
Wolfram Research

jgore@andrew.cmu.edu writes:

>Two Q's on the samples. 

>What is the P((int,int)) that sits atop the template file in the
>Mathelink samples. 

>Why does the addtwo sample declare 

>extern int addtwo

>in the same file where the addtwo is defined? 

>(Im getting link errors on a function that takes strings as arguments
>and the problem seems to resolve arund these factors. )

>Thanks, JG




  • Prev by Date: sound with 2.2
  • Next by Date: Re: Previous variable affects "/."
  • Prev by thread: Mathlink what is P(( ))
  • Next by thread: How to use Hot-Key