MathGroup Archive 2003

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

Search the Archive

Mathlink under osx

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39766] Mathlink under osx
  • From: "Shawn O'Connor" <soconnor at ccs.nrl.navy.mil>
  • Date: Thu, 6 Mar 2003 02:36:35 -0500 (EST)
  • Organization: Naval Research Laboratory, Washington, DC
  • Sender: owner-wri-mathgroup at wolfram.com

double addtwo P(( double, double));

:Begin:
:Function:       addtwo
:Pattern:        AddTwo[i_Double, j_Double]
:Arguments:      { i, j }
:ArgumentTypes:  { Double, Double }
:ReturnType:     Double
:End:

:Evaluate: AddTwo::usage = "AddTwo[x, y] gives the sum of two machine
integers x and y."




#include "mathlink.h"
extern double addtwo( double i, double j);



double addtwo( double i, double j)
{
    return i*j;
}



int main(int argc, char* argv[])
{
    return MLMain(argc, argv);
}


I am just learning how to use the mathlink and I cannot why this will not
work.  I am using 4.2 under osx.  Everything compiles but will not run
right.  I think it has something to do with the main statement but there is
little index help.  Can someone help.  Thank you.



  • Prev by Date: Desciphering Solve[] output.
  • Next by Date: Emergent Help: NSolve Problems!
  • Previous by thread: Re: Desciphering Solve[] output.
  • Next by thread: Re: Mathlink under osx