[squeak-dev] Building a linux/Pi library to call via FFI

tim Rowledge tim at rowledge.org
Thu Sep 10 17:29:24 UTC 2015


On 09-09-2015, at 6:53 PM, David T. Lewis <lewis at mail.msen.com> wrote:

> On Wed, Sep 09, 2015 at 11:17:08AM -0700, tim Rowledge wrote:
>> I?m trying - and so far failing - to do what should surely be a very simple
>> thing. This isn?t a new situation?  especially on unix.
>> 
>> I have a single C file with just two functions. I have a matching H file.
>> I want to make them into a dynamic library that I can call via FFI. This
>> really shouldn?t be rocket science stuff!
> 
> <OT>
> I assume there is some good reason that you would not do an end run
> around all that rocket science and just write a plugin?

Well I *did* originally point out that there was probably a really stupid mistake in my process and that is pretty much it. In my defence I was in the midst of FFI-ing to multiple external libraries for assorted Pi add-on doohickeys and getting somewhat inured to the idea. 

But I think I may re-do it as a plugin today, not least because it seems that the ARM ffi interface has a problem with returning floats; they come back as Character null. I may not be a great IEEE floating point standard expert but that doesn’t seem quite right.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Not enough sense to come in out of the rain.




More information about the Squeak-dev mailing list