Subject: mailing-list for TeXmacs Users
List archive
From : Madhusudan Singh <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] TeXmacs Mathematica plugin HowTo
- Date: Thu, 17 Feb 2011 16:21:29 -0600
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vCamze/cDfO3+/6OOMwGr4AbaTGBzWMb7XSovKoXBSkRf8/3iHSwpmwbviOXx+fN5r meUkpG8AgMI03gSJVIOp9DekSS1W5sukxbK5l8V7T1/xy5YCYNOYkNg/7oeqoZlGfQBn xipfQSaw8QwAvVdCpTfPUyjg9Ze5ugw4GyaAs=
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 source
Texmacs_math_plugin_files=/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/plugins/mathematica
#Mathematica files from your installation
Mathlink_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 line
Texmacs_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/mathem
cd /tmp/mathem
#copy necessary header
cp $Mathlink_Path/mathlink.h mathlink.h
#compile
gcc -o tm_mathematica.bin tm_mathematica.c -l$lib_option -lm -lpthread -lrt
#finally install executable
cp 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 type
tm_mathematica.c:154: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:161: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:168: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:185: warning: passing argument 2 of ‘MLGetSymbol’ from incompatible pointer type
tm_mathematica.c:186: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:195: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:210: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_mathematica.c:224: warning: passing argument 2 of ‘MLGetString’ from incompatible pointer type
tm_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 type
tm_mathematica.c:293: warning: format ‘%1d’ expects type ‘int’, but argument 2 has type ‘size_t’
ld: library not found for -lrt
collect2: ld returned 1 exit status
cp: tm_mathematica.bin: No such file or directory
What 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
- [TeXmacs] TeXmacs Mathematica plugin HowTo, Philippe Joyez, 02/15/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Youjun Hu, 02/16/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Youjun Hu, 02/16/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Madhusudan Singh, 02/17/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Madhusudan Singh, 02/18/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Madhusudan Singh, 02/22/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Madhusudan Singh, 02/18/2011
- Re: [TeXmacs] TeXmacs Mathematica plugin HowTo, Madhusudan Singh, 02/17/2011
Archive powered by MHonArc 2.6.19.