chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Compiling a file into both .dll and .o


From: felix winkelmann
Subject: Re: [Chicken-users] Compiling a file into both .dll and .o
Date: Fri, 2 Feb 2007 08:57:32 +0100

On 2/1/07, Ian Oversby <address@hidden> wrote:
Hi,

I have two scheme files that I wish to compile into a single executable.
One of the files has
embedded C code and is the library.  The other file uses functions defined
in the library.

I've added the following declaration to the top of the library:

(declare (unit win32_lib))

And this one to the top of the other file:

(declare (uses win32_lib))

I compile both of these with csc -c <file-name>

In addition, I would like to be able to load the library into csi and test
it interactively.
Unfortunately, with the unit declaration at the top, it doesn't seem to
compile
correctly with the -dynamic -dll flags.  Is there some way I can get the
same file to
compile both dynamically and statically?

Actually, thinking about it, can I use -prologue to add the declare line
just when I'm
compiling statically and is this the best way to do it?

Or you can pass "-unit" to csc when compiling the static library.


cheers,
felix




reply via email to

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