Thanks for your detailed reply.
After some minor source modifications, essentially:
* modify matrix.lua return value to ffi.load the gsl shared library.
* removing 'register_ffi_type ...' calls.
I manage to build a working (still experimental) standalone gsl module.
The tricky part, was to figure out how to load the 'libgsl.so' shared library (on ubuntu 12.04) because the provided packaged library on ubuntu is by default not linked with a blas library, which cause:
luajit: symbol lookup error: /usr/lib/libgsl.so: undefined symbol: cblas_XXXX
So i need to to manualy recompile libgsl from original source and forcing blas linking in the shared library ...
LIBS='- lblas -lm' make ...
If someone know a better solution using stock packaged library, help is welcome.
What i need to do now for better usability:
* binding 'gsl_set_error_handler (gsl_error_handler_t * new_handler);' to custom error handling (prevent abort() on error).
* try to reorgnaize code to prevent polluting global namespace with 'matrix' and 'complex' variables (defined as globals in matrix.lua).
* ...
Thanks for your great job on gsl-shell, this save me a lot of coding work.
JF.