[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Chicken 2.3 on Cygwin: trouble compiling an extensio
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Chicken 2.3 on Cygwin: trouble compiling an extension |
Date: |
Wed, 22 Mar 2006 19:30:20 +0100 |
On 3/22/06, John Cowan <address@hidden> wrote:
> Again, this is a vanilla Chicken 2.3 install on Cygwin, except for the
> "(if window-shell" patch that Felix sent me yesterday.
>
> Here's the log:
>
> $ cat mack.scm
> (define-extension mack
> (export mack hack))
>
> (define swhack 'swhack)
>
> (define (mack) (list swhack swhack))
>
> (define (hack) (vector swhack swhack))
>
> $ csc -verbose -extension mack.scm
You compile an extension (which is usually a dynamically loaded file, i.e.
has no main()) as an executable. The "-extension" option merely tells
the compiler to insert a "define-extension" statement into the code (which
you do already), but the file is still compiled as an executable.
You should replace "-extension" with "-shared", even though the former
is probably more intuitive...
cheers,
felix