1
$\begingroup$

Im using Wolfram language on Pi B,and I want to compile a '.m' file (like "test.m" that contains Wolfram functions), in an external program like a C/C++ and then Export the output in an image file type.

I have made these efforts:

1-I used wolfram -script test.m to compile test.m and it worked but it was too slow for me.

2-I used Wolfram headers like (libML32i3.a ,libML32i3.so ,libML32i4.a ,libML32i4.so ,mathlink.h) and copied them in "/usr/include" directory then as what here said (WSTP Development in C) I compiled one of the C codes in MathLink for examples by "make", the problem was when I wanted to run any of those codes like ./factor then I was asked for "Create link:" and then I typed something for example 'a' after that the program asked me "Integer to factor:" and when I typed the number the program couldn't display the output.(for example it takes 5 minutes but the program still doesn't have output).

3-I also used mkfifo mmpipe,tail -f mmpipe | wolfram,and then echo Export["test.gif", Plot[Sin[x], {x, 0, 10}]] > mmpipe" and wolfram displayed an error "Export::chtype: First argument test . gif is not a valid file specification."

so what should I do now.

Thanks.

$\endgroup$
1
  • $\begingroup$ Please, format your code accordingly -- either go to the help centre or press the curly bracket button directly in the text editor $\endgroup$
    – Sektor
    Jun 29, 2015 at 18:18

0