Subject: mailing-list for TeXmacs Users
List archive
From : Madhusudan Singh <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] TeXmacs Mathematica plugin HowTo
- Date: Tue, 22 Feb 2011 11:00:53 -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=QIy9vOuDQyNqNZSD9D3JfNXJ7buWuP0N7W8cwNVoPfiSa99wvnZyzBNf5sTlJnLYIR nl1VCYjkqzChZFsouVElBqk0XyWTS7JfvtMxx0KhZM+7qCTaWvrpy/KAZig56a4b4T98 zahmkFUQyZ/ceXYCv+FV/Qj1W6MnMdxxXq+nY=
Does anyone have any ideas regarding this ?
Mathematica plugin for MacOSX appears to be broken.
On Thu, Feb 17, 2011 at 5:08 PM, Madhusudan Singh <address@hidden> wrote:
Responding to my own post.Changed the shell script to:#! /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=MLi3#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 -I $Mathlink_Path -L$Mathlink_Path -l$lib_option -lstdc++ -framework Foundation -lm -lpthread#finally install executablecp tm_mathematica.bin $Texmacs_home/bin/tm_mathematica.binThis now chokes on getline (which is not a standard part of Mac OSX libc (FreeBSD based):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’Undefined symbols:"_getline", referenced from:_command in ccCetxkE.o_main in ccCetxkE.old: symbol(s) not foundcollect2: ld returned 1 exit statuscp: tm_mathematica.bin: No such file or directoryI have not found a workaround for this. Everywhere I read suggests the use of fgets() instead of getline(). Since my C coding skills have at least 10 years of rust, I am kind of stuck here.On Thu, Feb 17, 2011 at 4:21 PM, Madhusudan Singh <address@hidden> wrote:
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
- [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.