FFI Basic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FFI Basic

Annick Fron-3

Hi,

I made another attempt , a very basic one on window : trying to use the abs method in the standard lib.

abs: aNumber

<apicall: int 'abs' (int) module: 'c:\windows\system32\msvcr100.dll'>
self externalCallFailed

I get the error ‘cannot return the given type’.

But now if I use long as argument and long as return  it works.

Annick
Reply | Threaded
Open this post in threaded view
|

Re: FFI Basic

Clément Béra
Well the method with the code you give was compiled without any problem in my image (Pharo #30851 with FFI loaded with configuration browser as explained in the other thread).

Perhaps this is related to your bug in the other thread where you were (probably) missing a package ?




2014-07-10 18:15 GMT+02:00 Annick Fron <[hidden email]>:

Hi,

I made another attempt , a very basic one on window : trying to use the abs method in the standard lib.

abs: aNumber

<apicall: int 'abs' (int) module: 'c:\windows\system32\msvcr100.dll'>
self externalCallFailed

I get the error ‘cannot return the given type’.

But now if I use long as argument and long as return  it works.

Annick