On Wed, 01 Oct 2014 12:00:54 -0300 "José Roberto B. de A. Monteiro" <jord...@gmail.com> wrote:
> I am wondering if it is possible to link a pure C compiled file, in .o > or .so (or .dll) formats, into a running Lisp process and how I can do that. > > The case is a am running ECL via Emacs+Slime and it would be very useful > to link some modules written in C to bind then via uffi or native ffi. It is possible to load dynamically linked libraries using the ffi:load-foreign-library function (which internally uses dlopen(3)). CFFI probably also has a wrapper equivalent, but I personally have less experience with CFFI than with the ECL native FFI (and more experience with the native C-inline ECL FFI than with the ECL UFFI compatibility layer) but these would be your FFI options. If you want to produce bindings for a library in an implementation-agnostic way, I agree with pjb that you should use CFFI today. It is also possible to link compiler-objects together when producing an ECL executable, using: "ecl -o <destination> -link <objects>". These objects may include ones created from CL files using: "ecl -o <destination>.o -s -compile <source>.lisp", as well as objects created from C files using "cc -o <destination>.o -c <source>.c". -- Matt ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list