[Top][All Lists]

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

[Chicken-users] FFI and shared libraries

From: Joel Reymont
Subject: [Chicken-users] FFI and shared libraries
Date: Mon, 3 Jan 2005 01:28:51 +0000


I have a number of Scheme units that I'm compiling into one shared
library. I also have a couple of files that wrap existing C++ header
files, one Scheme file per header file. I'm able to compile all these
files into a shared library. I also compile into the shared library one
"main" file where  I do (load-library 'unit "") for each Scheme
unit. Then I do (declare (uses unit)) for each unit as well.

Problem is that when I do the declare uses for those Scheme units that
have FFI code it tries to load the Scheme file. If I don't put in
(declare unit ... ) into the FFI Scheme files then I get multiple
definitions of C_toplevel. 

I understand that I can create extension modules (shared libraries?) for
each C++ header file or maybe one module with all the header files
included. Is there a more elegant way, though?

    Thanks, Joel

OpenPoker: The Linux of poker software
* Tenerife * Canary Islands * Spain

reply via email to

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