Dear Sirs

Recently I moved to High Sierra with lua version 5.3.

I make a dynamic library from GSL and Swig the I call meurandist.so

I do:

swig -lua meurandist.i
gcc -I/usr/include/lua -c meurandist_wrap.c -o meurandist_wrap.o
gcc -c meurandist.c -o meurandist.o
gcc -fpic -bundle -undefined dynamic_lookup -llua -lgsl -lgslcblas -lm -Wall 
-I/usr/local/include -L/usr/local/lib meurandist_wrap.o meurandist.o -o 
meurandist.so

In my old machine all I need to do for call this library are  

"sudo cp randist.so /usr/local/lib/lua/5.2”

And then 

\startluacode
require "meurandist"
ARRAY_SIZE=100
arr=meurandist.new_int(ARRAY_SIZE)
meurandist.rpoisson(arr,ARRAY_SIZE,4)
for i=0,ARRAY_SIZE-1 do
        context(" "..meurandist.int_getitem(arr,i)..",")
  end
\stopluacode

Works nicely. 

But now I don’t have lua 5.2 installed. I have copied my dynamic library in the 
lua5.3 tree and that works fine if I call them from the console, but not works 
if all call inside a context document.

Did I need to install lua 5.2? Is it mandatary? Is there a another way to call 
c libraries?

Thanks a lot and have a luck year.

Jorge



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to