[Top][All Lists]

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

Re: [Chicken-users] [Chicken-hackers] Some questions about CHICKEN 5 egg

From: Peter Bex
Subject: Re: [Chicken-users] [Chicken-hackers] Some questions about CHICKEN 5 eggs and modules
Date: Wed, 29 Aug 2018 08:13:30 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Aug 28, 2018 at 08:40:33PM +0200, address@hidden wrote:
> > - How can I compile multiple source files, for example one scheme file and 
> > several C files, into an extension library in an .egg file? As far as I can 
> > see, the only way to do that is a custom build script, but that has 
> > problems of 
> > its own. In particular it is nearly impossible to do this right in the case 
> > of 
> > static linking, where CHICKEN seems to expect a single object file output 
> > (yes, 
> > ELF object files can be merged, but that's a pain in the rear).
> Yes, use a custom build script. I'm working on a way to handle the case of 
> separate
> ..c files that need to be linked. Due to how we support static linking this 
> is 
> not trivial.

As far as I understand the question (probably not really), a simple way to
do this is to (foreign-declare "#include \"foo.c\"") and add foo.h to the
source-dependencies of the file (see for example the simple-sha1 and
simple-md5 eggs, they do this).  No need for any special handling.

Of course it means your C files get a lot larger, and you don't benefit
from reduced compilation times from separate compilation.


Attachment: signature.asc
Description: PGP signature

reply via email to

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