<p dir="ltr">You dynamically load a static library. Have a look at how CFFI's test suite builds libtest.c.</p>
<p dir="ltr">HTH, <br>
Luís </p>
<br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 13, 2016, 20:35 Marco Antoniotti <<a href="mailto:marcoxa@cs.nyu.edu">marcoxa@cs.nyu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi<div><br></div><div>sorry for the noise…  I have gotten confused (among other things) about the status of CFFI’s mailing lists.</div><div><br></div><div>In any case, I have the following problem. <br><br>This is in my "test" file: <br><br><font face="Courier New"><br>(cffi:define-foreign-library cl-autowrap-tests-lib <br>  (t "cl-autowrap-test.a")) </font><br><br><br>This is what I get on LWM. <br><br><font face="Courier New">CL-USER 15 > (cffi:load-foreign-library 'cl-autowrap-tests::cl-autowrap-tests-lib) <br><br>Error: Unable to load foreign library (CL-AUTOWRAP-TESTS-LIB). <br>  Could not register handle for external module CL-AUTOWRAP-TESTS::CL-AUTOWRAP-TESTS-LIB: <br> no suitable image found.  Did find: <br>        /Users/marcoxa/Projects/Lang/CL/tests/cl-autowrap/cl-autowrap-test.a: file too short. <br>  1 (continue) Try loading the foreign library again. <br>  2 Use another library instead. <br>  3 (abort) Return to level 0. <br>  4 Return to top loop level 0. <br><br>Type :b for backtrace or :c <option number> to proceed. <br>Type :bug-form "<subject>" for a bug report template or :? for other options. <br><br></font><br>It obviously appears that something may be amiss with the <font face="Courier New">.a</font> (static) generation.  My C/C++ fu us very rusty. <br><br>Any ideas? <br><br>Cheers </div></div><div style="word-wrap:break-word"><div><br>-- <br>MA <br><div>--<br>Marco Antoniotti<br><br></div><br></div></div></blockquote></div>