[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] require-extension does not work in compiled code?
From: |
Michele Simionato |
Subject: |
Re: [Chicken-users] require-extension does not work in compiled code? |
Date: |
Sun, 5 Dec 2004 09:18:16 -0500 |
On Sun, 5 Dec 2004 14:55:35 +0100, felix winkelmann <address@hidden> wrote:
> The `(require-extension mylib)' is not completely correct.
> `require-extension' is intended to load centrally registered
> extensioni libraries and core library units on demand.
> It happens to work for .scm files, when they are accessible
> in the current include path.
> The `(require-extension mylib)' in the example above finds the
> local mylib.scm and loads/evaluates it. But the evaluator in
> compiled code supports only the most basic syntactic forms
> (and not `require-extension'). In that case require-extension is
> treated as any other function call, it's arguments are evaluated,
> and... the variable `regex' is not defined.
> You can use `(require 'regex)' instead
uhm ... I thought (require-extension regex) was the same as (require 'regex)
but evidently it is not the case
> or you can compile mylib
> to a shared object (csc mylib.scm -s) - require extension will
> find and load the .so, and compiled code has access to all
> extra macros.
>
> cheers,
> felix
It works but it does not work:
$ csc main
Error: illegal character in line 2: #\}
*** Shell command terminated with exit status 70:
/usr/local/bin/chicken main -output-file main.c -quiet
In spite of the error message
$ main
string-match is there#<procedure>
seems to work. Where is the illegal character coming from?
Michele Simionato