[Newbies] How to make FFI work?

Levente Uzonyi leves at elte.hu
Wed Sep 7 20:41:33 UTC 2011

On Wed, 7 Sep 2011, Overcomer Man wrote:

> FFI - Foriegn Function Interface example given at
> http://wiki.squeak.org/squeak/2422 fails to compile under a test class, so
> it can't work.  The error is expecting a '>' which implies the apicall is
> wrong.  Since it's example code, it's likely correct and the parser is not
> working.

Note that this example only works on Windows and FFI only supports 32-bit 
operating systems.

> I assumed it was a failure of FFI to be installed properly in Squeak 4.2
> All-In-One.  I tried the FFI install .st which gave an error about an
> unrecognized password.  (I have since been unable to locate that code to put
> the error and link in this post.)

You should use the http://source.squeak.org/FFI Monticello repository to 
load FFI. Load FFI-Pools first, then FFI-Kernel. Optionally you can load 
the platform code for your OS (FFI-Win32 if you're using windows) and the 
tests (FFI-Tests). If you don't want to bother with doing this manually, 
then you can use SqueakMap or there's the "Extending te system" item in 
the docking bar's Help menu. The second code snippet loads FFI.


> This is confusing since the FFI .dll comes with the All-In-One so it must be
> used somewhere.
> Any suggestions?  Getting FFI code to accept is needed in my attempt to load
> the old video package or try openCV.

More information about the Beginners mailing list