[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C module problem
From: |
rm |
Subject: |
Re: C module problem |
Date: |
Mon, 28 Feb 2011 11:16:28 +0100 |
User-agent: |
Mutt/1.5.15+20070412 (2007-04-11) |
On Mon, Feb 28, 2011 at 05:40:12PM +0800, nalaginrut wrote:
> > On Mon, Feb 28, 2011 at 04:54:00PM +0800, nalaginrut wrote:
> > > > I then run `guile' and evaluate
> > > > (load-extension "./sdl-guile.so" "init_module") and get the following
> > > > output.
> > > >
> > > > ERROR: In procedure load-extension:
> > > > ERROR: In procedure dynamic-link: file: "./sdl-guile.so", message:
> > > > "file not found"
> > >
> > > hi, you may type ",d load-extension" in the repl environment.
> > > And you will find this note:
> > > =======================================
> > > LIB should be a string denoting a shared library without any file
> > > type suffix such as ".so".
> > > =======================================
> >
> > Oops, forgot to omit the ".so". That doesn't seem to be the problem,
> > though.
> >
> > scheme@(guile-user)> (load-extension "sdl-guile" "init_module")
> > ERROR: In procedure load-extension:
> > ERROR: In procedure dynamic-link: file: "sdl-guile", message: "file not
> > found"
> >
> > scheme@(guile-user)> (load-extension "./sdl-guile" "init_module")
> > ERROR: In procedure load-extension:
> > ERROR: In procedure dynamic-link: file: "./sdl-guile", message: "file not
> > found"
> >
> > I am running it from the same directory as the file "sdl-guile.so".
> >
> > --Aidan
>
> You should read the document continuously. :-)
> =================================
> LIB should be a string denoting a shared library without any file
> type suffix such as ".so". The suffix is provided automatically.
> It should also not contain any directory components. Libraries
> that implement Guile Extensions should be put into the normal
> locations for shared libraries.
> =================================
> So I think you must copy the share lib into the lib directory.
Yes, that's the most obvious way but it should work with a ful pathname
as well. Note: './foo' isn't a full pathname - something like:
(load-extension (string-append (getcwd) "/sdl-guile") "init_module")
should work.
HTH Ralf Mattes
>
>
> --
> GNU Powered it
> GPL Protected it
> GOD Blessed it
>
> HFG - NalaGinrut
>