Use FFI to dynamically load shared library on Mac OS 10.5

James Foster Smalltalk at JGFoster.net
Fri Jan 18 22:21:53 UTC 2008


The SqueakDebug flag was very helpful. I now have the message that it  
found the library but the library had the wrong architecture. Now that  
I think of it, this seems quite likely--I'm trying to load a 64-bit  
library into a 32-bit executable. I'll see if I can find a 32-bit  
library; I bet that will work. Thanks very much.

James

P.S. It would be nice if #forceLoading actually resulted in an error  
if the load fails.


On Jan 18, 2008, at 1:32 PM, John M McIntosh wrote:

> Well if you are using the carbon library
>
> http://www.smalltalkconsulting.com/html/squeakinfoplist.html
>
> see
>
> SqueakPluginsBuiltInOrLocalOnly
>
> ah and oh look missing comment about  SqueakDebug
>
> if you set SqueakDebug  to 1 versus 0, then the mac carbon VM will  
> print all sorts of dianostics information as it tries to file the  
> module, and entry point you've asked for.
> This information likely will go to your console log
>
>
> On Jan 18, 2008, at 12:55 PM, James Foster wrote:
>
>> I'm trying to dynamically load a shared library (.so) and  
>> consistently get "Unable to find function address." I have tried  
>> putting the library in a variety of locations (next to the  
>> executable, next to the image, next to the FFI package, etc.) and I  
>> have set the environment variable DYLD_LIBRARY_PATH to the location  
>> of the library. Nothing seems to work (although the FFI tests all  
>> pass). Any advice?
>>
>> James Foster
>>
>
> --
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd.  http:// 
> www.smalltalkconsulting.com
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>
>
>
>




More information about the Squeak-dev mailing list