5 Jun 2005 01:07
Shared libs for executables and interpreter
<MichaelL <at> frogware.com>
2005-06-04 23:07:17 GMT
2005-06-04 23:07:17 GMT
Is it possible to build a shared library that works from both the
interpreter and a compiled "main" executables?
If I have a file like this:
(declare (unit adder))
(define (add x y)
(+ x y))
I have to remove the "declare" to get it to load into the interpreter
without error, and I have to add it to use the unit as a shared library
from a Chicken executable.
I'm using 1.89 on Windows, and I'm compiling the library with the -dll
switch like this:
adder.dll: adder.scm
csc adder.scm -dll
The executable that uses the library looks like this:
(require-extension adder)
(print (add 2.0 2.0))
The error I get in the interpreter if the declare is present looks like
this:
#;1> (require-extension adder)
; loading .\adder.dll ...
Error: unbound variable: |MZ\É\ \♥\ \ \ \♦\ \ \ \ \ \ \ \╕\ \ \ \ \ \ \ <at> \
\ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \α\ \ \
\♫\▼\║\♫\
\┤|
_______________________________________________ Chicken-users mailing list Chicken-users <at> nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
RSS Feed