[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Problem hatching my own egg
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Problem hatching my own egg |
Date: |
Mon, 13 Dec 2004 07:09:11 +0100 |
On Fri, 10 Dec 2004 18:24:18 +0000, Joel Reymont <address@hidden> wrote:
> So I picked Chicken because of an active community, standards
> compatibility (some things don't run off the bat in Gambit), the SDL egg
> and the SWIG interface. And all the help I have been getting from Felix
> and Ed has been great!
>
> I'm trying to build my own egg by wrapping the guichan library (http://
> guichan.darkbits.org). I thought I was done but I get an error when
> loading the egg. There are no errors when building it.
>
> #;1> (require 'guichan)
> ; loading ./guichan.so ...
> Error: unbound variable: |\þ\í\ú\Î\\\\\\\\\\\\\\\\\|
>
> I'm on Mac OSX and the egg is built as a bundle so the linker screams and
> shouts when there are undefined symbols. I get no such errors until
> actually trying to use the egg above.
>
Hm. Apparently require is trying to load a binary as a source file,
there. It might be possible that you dynamic loading stuff doesn't
work. Have you the libdl stuff installed?
Do simple tests like this work:
$ cat foo.scm
(print "yow.")
$ csc -vs foo.scm
$ csi foo.so
?
What's the output of "-v" in the invocation of csc above?
Does the SWIG-generated file have a `unit' declaration? If
yes, try (load-library 'guichan "./guichan.so") instead (but compile it
without the "-s" option, perhaps with something like:
$ csc guichan.scm -c
$ gcc guichan.c -lguichan ... # whatever is needed
That should give you a normal shared library, which `load-library'
is able to load and resolve.
Alternatively, just remove the unit declaration from guichan.scm
and compile with -s.
cheers,
felix