[Top][All Lists]

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

Re: [Chicken-users] Building shared libraries from multiple units

From: Joel Reymont
Subject: Re: [Chicken-users] Building shared libraries from multiple units
Date: Thu, 16 Dec 2004 18:54:36 +0000

> Joel Reymont wrote:

>I split the wrapper into  multiple SWIG interface files now so that I
>could let make figure out what files to rebuild. It appears, though, that
>I can no longer have one unit for my shared library as multiple
>C_toplevel functions get defined. One is used per cpp/scheme file and
>initializes TinyCLOS, etc. Problem is resolved if I build each scheme
>file as a separate unit but it seems to me that I would have to include
>them separately as well.
>Is there a way to do what I'm trying to do with just one unit?

There I go answering meself again...

This is how I build the shared library: $(OBJ) guichan.scm
        $(CSCLD) -s -o $@ $^ $(WRAP_OBJ)

I build the object files (from cpp files generated by csc) and the swig
wrapper cxx files beforehand. 

guichan.scm used to be an empty file as you cannot just give a bunch of
object files to csc and expect it to link them. It does need a scheme
file apparently. Well, rather than keep the empty file around I put these
lines into it:

(load-library 'sdl "./")
(load-library 'guichan "./")
(load-library 'color "./")
(load-library 'font "./")
(load-library 'graphics "./")
(load-library 'imageloader "./")
(load-library 'input "./")
(load-library 'misc "./")
(load-library 'rectangle "./")
(load-library 'widgets "./")

Now I can just do (require 'guichan) and happily move on!


OpenPoker: The Linux of poker software
Tenerife: Canary Islands: Spain

reply via email to

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