Thanks Hernan.

It still doesn't work. I've also tried to play with LD_LOAD_PATH / LD_LIBRARY_PATH no success.... I want to make it work so I need to learn :)


For the mangled function names, on Linux and OSX there's nm.

Here's what I get:

$ nm -g libyaz.3.dylib | grep ZOOM_connection_create
0000000000046a30 T _ZOOM_connection_create

Cheers,

Laurent


On Sun, Dec 19, 2010 at 6:23 PM, Hern��n Morales Durand <hernan.morales@gmail.com> wrote:
Hi Laurent,

Thanks for reporting. The correct #moduleName for MacOS was missing,
I've uploaded a new version answering 'libyaz.3.dylib' which I guess
is the corresponding for 'yaz3.dll' (according to
http://en.wikipedia.org/wiki/Dynamic_library#Naming ).

I haven't access to a MacOS, but in Windows I've had to find the
mangled function names (i.e. _ZOOM_connection_create@4) so FFI can
find the function addresses and you don't get the classic "Error:
Unable to find function address". I don't know if it's related since
talks about C++, but you may want to check
http://wiki.squeak.org/squeak/3735

The tool I've used to find the mangled function names in Windows is
the Steve Miller's Dependency Walker http://www.dependencywalker.com/

2010/12/19 laurent laffont <laurent.laffont@gmail.com>:
> Hi,
>
> I want to use��http://www.squeaksource.com/Z3950
> Following install instructions, I've dowloaded yaz sources (I've tried 4.1.2
> and 3.0.52) as it seems there's no binary for OSX, ./configure &&��make &&
> make install.
> Then using latest Seaside One Click image I've copied /usr/local/lib/*yaz*
> ��in Seaside.app/Contents/MacOS
> $ ls ~/Downloads/Seaside.app/Contents/MacOS/
> Squeak VM Opt �� �� �� �� libyaz.a �� �� �� �� �� �� ��libyaz.la
> libyaz_icu.a �� �� �� �� ��libyaz_icu.la �� �� �� �� libyaz_server.a
> libyaz_server.la��libyaz.3.dylib �� �� �� ��libyaz.dylib
> ��libyaz_icu.3.dylib �� ��libyaz_icu.dylib �� �� ��libyaz_server.3.dylib
> libyaz_server.dylib
>
>
> But then I have a External Module Not Found on
> YAZPQFFFILibrary>>createParser
> " YAZPQDFFILibrary default createParser "
> <cdecl: YAZPQFParser 'yaz_pqf_create' (void) module: 'yaz3'>
> ^ self externalCallFailed
>
> Any hint ?
> Cheers,
> Laurent Laffont -- FFI newbie
>
> Pharo Smalltalk Screencasts: http://www.pharocasts.com/
> Blog: http://magaloma.blogspot.com/
>

--
Hern��n Morales
Information Technology Manager,
Institute of Veterinary Genetics.
National Scientific and Technical Research Council (CONICET).
La Plata (1900), Buenos Aires, Argentina.
Telephone: +54 (0221) 421-1799.
Internal: 422
Fax: 425-7980 or 421-1799.