Extendraphics(&MathLink) package problem
- To: mathgroup at smc.vnet.net
- Subject: [mg17193] Extendraphics(&MathLink) package problem
- From: Jan Krupa <krupa at alpha.sggw.waw.pl>
- Date: Tue, 20 Apr 1999 01:21:04 -0400
- Organization: http://news.icm.edu.pl/
- Sender: owner-wri-mathgroup at wolfram.com
I use Mathematica3.02 under Linux (debian2.0,glibc2). Before using the ExtendGraphics package I have installed the update of mathlink for Linux (I have found only for ReDHat5 but may be it should work under Debian2.0?) http://www.wolfram.com/support/MathLink/Updates/MLDK.html I just copied the linux directory (after I unpacked the Linux-ml6.tar.Z) to /usr/local/mathematica/AddOns/DevelopersKits/ Then I have got the file ExtendGraphics30.tar (330 Kb) from http://www.mathsource.com/cgi-bin/MathSource/Enhancements/Graphics/3D/0208-976 untared it and copied to to /usr/local/mathematica/AddOns/Aplication/ Then copied the files (libML.a, mathlink.h,...) from /usr/local/mathematica/AddOns/DevelopersKits/Linux to /usr/local/mathematica/AddOns/Aplication/ExtendGraphics and I entered: mcc -o contour contour.tm mcc -o delaunay delaunay.tm mcc -o mandelbrot mandelbrot.tm : mandelbrot.tm.c:141: warning: prototype for `sendimage' follows mandelbrot.tm:60: warning: non-prototype definition here mcc -o image image.tm : image.tm.c:79: warning: prototype for `sendimage' follows image.tm:18: warning: non-prototype definition here I put the executable files contour, delaunay, ..., in mathematica Path /usr/local/mathematica/AddOns/Aplication/ (this directory on of those which in the MA Path, the command $Path shows that) Now I tried to test the package in mathematica X FrontEnd: I. First test (It works!): In[1]:=ToFileName[ {$TopDirectory, "AddOns", "Applications"}] In[2]:=Needs["ExtendGraphics`Geometry`"] In[3]:= tri = Polygon[{{4,5}, {2,1}, {9,5}}]; In[4]:= Show[ Graphics[ {Boundary[tri], InCircle[tri]}]]; II. Second Test I cannot load Mandelbrot package: In[5]:=Needs["ExtendGraphics`Mandelbrot`"] LinkConnect::"linkc": "\!\(LinkObject[\(\"ExtendGraphics`./mandelbrot`\", 2, 2\)]\) is dead; \ attempt to connect failed." MandelbrotImage::"fail": "Installation of the MathLink binary mandelbrot failed. The binary must \ be found for the functions to work." However the following way works (first I installed the external program mandelbrot via mathlink): In[6]:= link=Install["mandelbrot"] Out[6]= LinkObject["'/home/krupa/.Mathematica/3.0/AddOns/Applications/mandelbrot'",3, 2] In[7]:= Needs["ExtendGraphics`Mandelbrot`"] In[8]:= Show[ MandelbrotImage[{-2,-1.5}, {1,1.5}, 50, 10]] I have noticed that the Mandelbrot.m package installs the MathLink binary mandelbrot the following way: Install[ "ExtendGraphics`mandelbrot`"] but when I try to execute the program mandelbrot from the command line just typing mandelbrot I got the following message bash: mandelbrot: command not found However ./mandelbrot works. I have tried to modify (it is illegal?) the Mandelbrot.m putting Install[ "ExtendGraphics`./mandelbrot`"] instead Install[ "ExtendGraphics`mandelbrot`"] but it does not help. III. Test of SurfaceGraphics3D In[9]:= Needs["ExtendGraphics`SurfaceGraphics3D`"] LinkConnect::"linkc": "\!\(LinkObject[\(\"ExtendGraphics`delaunay`\", 4, 3\)]\) is dead; \ attempt to connect failed." Delaunay::"fail": "Installation of the MathLink binary delaunay failed. The binary must be \ found for the functions to work." So I put first In[10]:=link1 = Install["delaunay"] Out[10]=LinkObject["'/home/krupa/.Mathematica/3.0/AddOns/Applications/delaunay'",5,3] Now In[11]:=Needs["ExtendGraphics`SurfaceGraphics3D`"] seems to work (no message) Does anyone know how to get rid of the annoying behaviour of the ExtendGraphics package and MathLink? Jan