chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] unbound variable: export


From: felix winkelmann
Subject: Re: [Chicken-users] unbound variable: export
Date: Mon, 23 Oct 2006 08:20:51 +0200

On 10/22/06, Andreas Zwinkau <address@hidden> wrote:
> How exactly are you using "export"?

$ cat cackle-base.scm
(define-extension cackle-base)
(include "cackle-server.scm")
[...]
$ cat cackle-server.scm
(use http-server http-utils)
(declare (export cackle:server))
[...]

It seems your compiled code is trying to load a file
with the export declaration as source code (the evaluator
available at run-time does only support basic R5RS syntax
and not (among others) "declare".

Can you provide the exact compilation instructions you
used to build cackle-base.so?


> If you compiled cackle-base.scm with the "-shared" option,
> load-library will not work, BTW.
I'm confused about load-library now, because i thought, this is
exactly what it is used for??

"load-library" is intended to load a shared object (dynamic library,
most of the time) that includes several modules. For example the
core library units in the chicken library (srfi-1, utils, etc.) are loaded
that way. "load-library" can invoke a given entry-point function.
If you compile a file into a .so using -shared, then you just use
"load" or "require" or "require-extension", which invokes the
main entry-point. "load-library" is mostly useful if you combine multiple
shared objects into a single library.


cheers,
felix

--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

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