More on the story.

So, the X11 example may not be the best one to have in FFI. It is
interesting but complicated.

A basic call, like:

Sample class>>callC: aString
<cdecl: short 'puts' (char*) module: '/lib/libc-2.12.so'>
^self externalCallFailed

works nicely.

Sample callC: 'Hello'.

prints Hello on stdout.

Phil



On Mon, Sep 22, 2014 at 6:10 PM, p...@highoctane.be <p...@highoctane.be>
wrote:

> I've been able to reproduce this.
>
> Well, my CentOS thing requires me for some reason to put
> /usr/lib/libX11.so.6 in the module name (doing these kind of things looks
> like usual for lib names with FFI from what I saw from old Squeak threads).
>
>
> XCreateGC: xDisplay with: aDrawable with: valueMask with: values
> <cdecl: X11GC 'XCreateGC' (X11Display* X11Drawable ulong long*) module:
> '/usr/lib/libX11.so.6'>
>
> Now, other internal FFIPrims tests do work.
>
> So, it is X11 or something else, I do not know.
>
> Phil
>
>
> On Mon, Sep 22, 2014 at 4:39 PM, Ben Coman <b...@openinworld.com> wrote:
>
>> Annick Fron wrote:
>>
>>> Hi,
>>>
>>> I have posted a bug about this in fogbugz.
>>> FFI example on Linux don’t work
>>>
>>> X11Display coloredRectangles
>>> raises an error « coud not coerce arguments ».
>>> In fogbugz, I was asked to raise this question in the mailing list, to
>>> know if it comes from the VM or from FFI.
>>>
>>> Annick
>>>
>>>
>>>
>> Hi Annick,
>> Sorry I don't know anything about this topic to help, just a minor
>> observation that a link to the fogbugz issue would help streamline things
>> for someone who does.
>> :)
>> cheers -ben
>>
>>
>>
>>
>

Reply via email to