Re: MathLink
- To: mathgroup at smc.vnet.net
- Subject: [mg25984] Re: MathLink
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 15 Nov 2000 02:09:38 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <8ur06v$qsj@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, the spaces in your linkname argument ? Try: void init_and_openlink() { long err; ep = MLInitialize( (MLParametersPointer)0); if( ep == (MLENV)0) exit(1); atexit( deinit); lp=MLOpenString(ep,"-linkname \"C:\\Program Files\\Wolfram Research\\Mathematica\\4.0\\MathKernel.exe\" -linkmode launch",&err); if(lp == (MLINK)0) exit(2); atexit( closelink); } Regards Jens Mirek Latka wrote: > > I am trying to call a mathematica function from my C program (Win98). I use > the enclosed function to > start the kernel. The program works fine but I cannot get rid of the file > select windows which pops up > and ask me to select a mathlink program. I would be grateful for any > suggestions as to how to fix this > problem. > Thanks, > Mirek Latka > > void init_and_openlink() > { > long err; > > ep = MLInitialize( (MLParametersPointer)0); > if( ep == (MLENV)0) exit(1); > atexit( deinit); > > lp=MLOpenString(ep,"-linkname C:\\Program Files\\Wolfram > Research\\Mathematica\\4.0\\MathKernel.exe -linkmode launch",&err); > if(lp == (MLINK)0) exit(2); > atexit( closelink); > > }