Re: Mathlink under osx
- To: mathgroup at smc.vnet.net
- Subject: [mg39775] Re: Mathlink under osx
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 7 Mar 2003 03:30:37 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <b46uo2$93n$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
what do you type to install the program ?
If you have spaces in the path to your addtwo
program you have to protect the spaces with \
i.e.,
Install["Mathematica\ 4.2/AddOns/MathLink/addtwo"]
regards
Jens
Shawn O'Connor wrote:
>
> 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.