Re: about mathlink connection
- To: mathgroup at smc.vnet.net
- Subject: [mg97519] Re: about mathlink connection
- From: olfa <olfa.mraihi at yahoo.fr>
- Date: Sat, 14 Mar 2009 18:13:25 -0500 (EST)
- References: <gp5fqj$9p9$1@smc.vnet.net> <gp7vth$1e0$1@smc.vnet.net>
On 13 mar, 10:54, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> wrote: > Hi, > > since I have not your source code, I can't tell you what's wrong. > But my own MathLink programs do that typical when > I have given a false path or some dll can't be found. > > Regards > Jens > > > > olfa wrote: > > On 11 mar, 10:22, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> > > wrote: > >> Hi, > > >> typical this dialog box pops up when MathLink alone can't start the > >> binary, i.e., a missing command line argumente like " -mathlink " > >> in your string .. > > >> Regards > >> Jens > > >> olfa wrote: > >>> Hi mathematica community, > >>> I have a c++ program in which I established a comunication with > >>> mathematica via mathlink. > >>> But when my program is executed, a "Choose a MathLink Program to > >>> Launch" dialog box appears and ask me to choose between some > >>> executables. This is how I established the connection: > >>> link = MLOpenString(env,"-linkname \"C:\\Wolfram Research\\Mathemat= ic= > > a\ > >>> \6.0\\MathKernel.exe\"",&error); > >>> Note that I have chosen to launch mathkernel.exe so why the dialog bo= x > >>> appears and How can I get rid of this dialog box? > >>> Thank you.- Masquer le texte des messages pr=E9c=E9dents - > >> - Afficher le texte des messages pr=E9c=E9dents - > > > Thank you for your reply Jens. I've added -mathlink,but the dialog box > > still appearing! : > > ml = MLOpenString(env,"-linkname \"C:\\Wolfram Research\\Mathematica\ > > \6.0\\MathKernel.exe\" -mathlink",&error);- Masquer le texte des messag= es pr=E9c=E9dents - > > - Afficher le texte des messages pr=E9c=E9dents - hi Mr Jens here is my source code: void main(){ MLENV env; int error; MLINK ml; env = MLInitialize(0); if(env == (MLENV)0) { printf("unable to initialize environment"); } ml = MLOpenString(env,"-linkname \"C:\\Program Files\\Wolfram Research\\Mathematica\\6.0\\MathKernel.exe\" -mathlink",&error); if(ml == (MLINK)0 || error != MLEOK) { printf("unable to create link to the Kernel"); } MLActivate(ml); if(!MLActivate(ml)) { printf("unable to establish communication");} return ml; } } Thank you.