embedding ecl without (build-program)

Juraj Variny rini17 at gmail.com
Mon Feb 29 12:15:32 UTC 2016


Hello,

Is there is a way for ECL only to generate a bunch of .cpp files that can be 
fed to existing build system? I'm halfway there by generating C from my  
(ffi:c-inline) stuff like:

(compile-file "src/common/lisp/lispinterface.lisp" :output-file 
"src/common/lisp/lispinterface.cpp"). 

But how do I initialize it on app startup? Looks like 

void init_fas_CODE(cl_object flag) 

should be called, but with what parameters?

Some background: I am trying to embed ECL in a big C++ app with its own 
byzantine build system (ftjam with own layer on top of it). These C++ 
functions I am interfacing are not exposed externally (and I prefer not to), 
thus trying to load .fas file at runtime results in linker error. Also, I 
can't use (build-program) which won't work together with the build system.

However, if (build-program) knows how to neatly pack whole initialization into 
one C function, that would solve the problem, too.

Regards, 

Juraj



More information about the ecl-devel mailing list