chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Units as shared libraries (SWING, dynamic, does not work


From: Joel Reymont
Subject: [Chicken-users] Units as shared libraries (SWING, dynamic, does not work)
Date: Sat, 11 Dec 2004 00:52:26 +0000

Folks,

Here's the issue. Very simple to reproduce:

;;(declare (unit bar))

(define stuff
        (lambda () (display "Stuff!\n")))

Place the code above in bar.scm. It will compile with "csc -s bar.scm"
and produce a shared library bar.so. You can load this library with
"(require 'bar)" even if you are in the directory where you compiled it.

Uncomment the unit declaration and the library will compile again but you
will get the following error when trying to load it:

#;1> (require 'bar)
; loading ./bar.so ...
Error: unbound variable: |\þ\í\ú\Î\\\\\\\\\\\\\\|

I get the same error with Chicken 1.66 and 1.74 on Mac OSX.

I searched the archives and saw Felix saying that units weren't meant to
be compiled with -dynamic. I need to wrap a couple of C++ libraries for
my project and SWIG wraps libraries in units. It would not be a problem
for me to remove the unit declaration but I'd rather not.

Is there a particular reason for this restriction? How can I work around
this issue?

    Thanks, Joel

--
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums
Tenerife: Canary Islands: Spain





reply via email to

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