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

Chris Cunnington brasspen at gmail.com
Wed Sep 9 19:55:35 UTC 2015


I think you may have typed "W" one to many times in this Makefile and
you're adding them where they don't belong. I detect a rogue W in the name
madgwick.

@$(CC) -shared -Wl,-soname,libmadgwickIMU.so -o
lib--------->w<---------madgwickIMU.so.$(VERSION) -lm $(OBJ)

Also, when I compile on this Ubuntu 15.04 I get an error. [1]

FWIW,
Chris

[1]

$ make
[Compile] MadgwickAHRS.c
MadgwickAHRS.c: In function ‘invSqrt’:
MadgwickAHRS.c:218:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
  long i = *(long*)&y;
  ^
MadgwickAHRS.c:220:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
  y = *(float*)&i;
  ^
[Link (Dynamic)]




On Wed, Sep 9, 2015 at 2:55 PM, tim Rowledge <tim at rowledge.org> wrote:

>
> On 09-09-2015, at 11:44 AM, Chris Cunningham <cunningham.cb at gmail.com>
> wrote:
> > ok.  Does FFI know to prepend the lib and postpend the .so in Unix for
> you?  I'm curious.
>
> Well, it does for other libraries; for example calling libwiringPi.so you
> use #<cdecl: void ‘foo’ (int) module: ‘wiringPi’>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: SNARF: System Normalize And Reset Flags
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150909/37c49094/attachment.htm


More information about the Squeak-dev mailing list