I am trying to do this for Mathematica 7.0 on Snow Leopard (10.6.6).I modified the script above:#! /bin/bash#first define paths#here we use the texmacs installed files, but can also be the downloaded sourceTexmacs_math_plugin_files=/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/plugins/mathematica#Mathematica files from your installationMathlink_Path="/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/"#In this directory we'll use the header mathlink.h and a shared library#libMLxxx.so where xxx depends on the architecture#for me, the library is "libML64i3.so" :lib_name=libMLi3.a#for Linux, normally no editting needed below this lineTexmacs_home=$HOME"/.TeXmacs"#lib_option=${lib_name:3:${#lib_name}-6} #strip "lib" and ".so"lib_option=M#make the dynamic library accessible at runtime in the usual system library#path (needs admin rights):sudo ln -s $Mathlink_Path/$lib_name /usr/lib/$lib_name#make temporary writable copy of souce and use as working directory:cp -rf $Texmacs_math_plugin_files/src.lazy /tmp/mathemcd /tmp/mathem#copy necessary headercp $Mathlink_Path/mathlink.h mathlink.h#compilegcc -o tm_mathematica.bin tm_mathematica.c -l$lib_option -lm -lpthread -lrt#finally install executablecp tm_mathematica.bin $Texmacs_home/bin/tm_mathematica.bin----I get the following errors:
tm_mathematica.c: In function ‘command’:tm_mathematica.c:146: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:154: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:161: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:168: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:185: warning: passing argument 2 of ‘MLGetSymbol’ from incompatible pointer typetm_mathematica.c:186: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:195: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:210: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:224: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer typetm_mathematica.c:252: warning: format ‘%1d’ expects type ‘int’, but argument 2 has type ‘long int’tm_mathematica.c: In function ‘main’:tm_mathematica.c:282: warning: passing argument 3 of ‘MLOpenString’ from incompatible pointer typetm_mathematica.c:293: warning: format ‘%1d’ expects type ‘int’, but argument 2 has type ‘size_t’ld: library not found for -lrtcollect2: ld returned 1 exit statuscp: tm_mathematica.bin: No such file or directoryWhat library does -lrt linker directive point to ?On Wed, Feb 16, 2011 at 5:25 AM, Youjun Hu <address@hidden> wrote:
> Final note: in recent mathematica versions the default graphics output is notI checked this, yes, it does.
> postscript anymore, which is what TeXmacs needs. However you can correct the
> problem easily by evaluating (once per mathematica session):
>
> Get["Version5`Graphics`"]
>
> Hope it helps,
>
> Philippe
Archive powered by MHonArc 2.6.19.