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

        jmax@jmax ~/chicken-example $ cat a.scm
        (declare (unit a))
        
        (define (a) "result a")
        jmax@jmax ~/chicken-example $ cat b.scm
        (declare (unit b))
        
        (define (b) "result b")
        jmax@jmax ~/chicken-example $ csc -c -C -fPIC a.scm
        jmax@jmax ~/chicken-example $ csc -c -C -fPIC b.scm
        jmax@jmax ~/chicken-example $ csc -s -o functions.so a.o b.o
        jmax@jmax ~/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
        
        jmax@jmax ~/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                          [email protected]
Software Developer, OpenAmplify



_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to