bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FFI on OS X?


From: Andy Wingo
Subject: Re: FFI on OS X?
Date: Wed, 02 Mar 2011 22:22:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Wed 02 Mar 2011 21:07, Michael Ellis <address@hidden> writes:

> scheme@(guile-user)> (define libm (dynamic-link "/usr/lib/libm.dylib"))
> ERROR: In procedure dynamic-link: file: "/usr/lib/libm.dylib",
> message: "file not found"

What if you leave off the suffix?

    scheme@(guile-user)> (use-modules (system foreign))
    scheme@(guile-user)> (dynamic-link "libm")
    $1 = #<dynamic-object "libm">

Guile uses libltdl, which does this sort of thing.

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]