[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: John Lenz
Subject: Re: [Chicken-users] Building shared libraries from multiple units
Date: Thu, 16 Dec 2004 21:39:08 +0000

On 12/16/04 14:57:15, Joel Reymont wrote:
> Joel Reymont wrote:

>Each module generated by SWIG has this at the top:
>(declare (unit sdl))
>    (hide swig-init)
>    (foreign-declare "C_extern void swig_sdl_init(C_word,C_word,C_word)
>(define swig-init (##core#primitive "swig_sdl_init"))
>(define swig-init-return (swig-init))
>After all my library loading swig-init-return becomes that of the widgets
>unit which is not quite what I'm looking for. Bummer!

And now for that ultimate solution...

Adding (hide swig-init-return) right after (hide swig-init) does the

Maybe that should be done by default by the SWIG Chicken module. As per
the  Chicken module it should be more efficient too.

Right now I run sed on the generated Scheme file to hide swig-init-
return. Is there a cleaner way?

Just edit the Lib/chicken/swigclosprefix.scm file in wherever you have SWIG installed. When SWIG runs, it just copies that file directly into the top of the .scm file.

I will fix it as well in CVS...


reply via email to

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