chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Building a shared library


From: John Maxwell
Subject: [Chicken-users] Building a shared library
Date: Mon, 14 May 2012 14:22:03 -0400

I am trying to build a shared library, and having puzzling problems.
I've constructed a toy example that illustrates the problem:

        address@hidden ~/chicken-example $ cat a.scm
        (declare (unit a))
        
        (define (a) "result a")
        address@hidden ~/chicken-example $ cat b.scm
        (declare (unit b))
        
        (define (b) "result b")
        address@hidden ~/chicken-example $ csc -c -C -fPIC a.scm
        address@hidden ~/chicken-example $ csc -c -C -fPIC b.scm
        address@hidden ~/chicken-example $ csc -s -o functions.so a.o b.o
        address@hidden ~/chicken-example $ csi
        
        CHICKEN
        (c)2008-2011 The Chicken Team
        (c)2000-2007 Felix L. Winkelmann
        Version 4.7.3 ((no branch)) (rev 5bbf21f)
        linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
        compiled 2011-08-17 on hd-t1179cl (Linux)
        
        #;1> (load "functions.so")
        ; loading functions.so ...
        
        Error: (load) unable to load compiled module - unknown reason:
        "functions.so"
        
                Call history:
        
                <syntax>          (load "functions.so")
                <eval>    (load "functions.so") <--
        #;1> ,q
        
        address@hidden ~/chicken-example $ 
        
I suspect that the underlying cause is my incomplete understanding of
the "declare" construct.

I've scanned the mailing list archive, and I'm currently digging through
the Chicken source and documentation in an effort to figure this out,
but if anyone here can shed some light, that would be wonderful.

-John

-- 
John Maxwell                          address@hidden
Software Developer, OpenAmplify





reply via email to

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