FFI Problem with Mac 4.2.5 VM

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

FFI Problem with Mac 4.2.5 VM

Sean P. DeNigris
Administrator
I'm having trouble calling a Mac Foundation function via FFI. It appears to be the plugin for the Mac 4.2.5
VM. There was a discussion at http://forum.world.st/FFI-to-call-Mac-Carbon-functions-td3507842.html

The meat of it is:
        After I put a link to the Foundation lib in the VM's Resources folder, I compiled:

        CarbonFunctions class>>NSMakeRectWithX: xFloat y: yFloat w: widthFloat h: hFloat
                <apicall: void* 'NSMakeRect' (float float float float) module: 'Foundation'>
                ^self externalCallFailed

        DoIt:
        CarbonFunctions
                NSMakeRectWithX: 0.0
                y: 0.0
                w: 100.0
                h: 100.0.

        Error: Unable to find function address

Other relevant info:
* I am able to call libc functions

Thanks.
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: FFI Problem with Mac 4.2.5 VM

David T. Lewis
 
I do not know enough about OS X to offer much help, but I opened a
Mantis report <http://bugs.squeak.org/view.php?id=7636> to track the
issue.

Dave

On Sat, May 21, 2011 at 12:30:37PM -0700, Sean P. DeNigris wrote:

>  
> I'm having trouble calling a Mac Foundation function via FFI. It appears to
> be the plugin for the Mac 4.2.5
> VM. There was a discussion at
> http://forum.world.st/FFI-to-call-Mac-Carbon-functions-td3507842.html
>
> The meat of it is:
>         After I put a link to the Foundation lib in the VM's Resources
> folder, I compiled:
>
>         CarbonFunctions class>>NSMakeRectWithX: xFloat y: yFloat w:
> widthFloat h: hFloat
>                 &lt;apicall: void* 'NSMakeRect' (float float float float)
> module: 'Foundation'&gt;
>                 ^self externalCallFailed
>
>         DoIt:
>         CarbonFunctions
>                 NSMakeRectWithX: 0.0
>                 y: 0.0
>                 w: 100.0
>                 h: 100.0.
>
>         Error: Unable to find function address
>
> Other relevant info:
> * I am able to call libc functions
>
> Thanks.
> Sean
>
> --
> View this message in context: http://forum.world.st/FFI-Problem-with-Mac-4-2-5-VM-tp3541069p3541069.html
> Sent from the Squeak VM mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: FFI Problem with Mac 4.2.5 VM

Sean P. DeNigris
Administrator
David T. Lewis wrote
I opened a
Mantis report to track the issue.
Thanks, Dave!
Cheers,
Sean