chicken-users
[Top][All Lists]
Advanced

[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 19:28:29 +0000

> Joel Reymont wrote:

>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 "./guichan.so")
>(load-library 'guichan "./guichan.so")
>(load-library 'color "./guichan.so")
>(load-library 'font "./guichan.so")
>(load-library 'graphics "./guichan.so")
>(load-library 'imageloader "./guichan.so")
>(load-library 'input "./guichan.so")
>(load-library 'misc "./guichan.so")
>(load-library 'rectangle "./guichan.so")
>(load-library 'widgets "./guichan.so")
>
>Now I can just do (require 'guichan) and happily move on!

Not quite :-(

Each module generated by SWIG has this at the top:

(declare (unit sdl))

(declare
    (hide swig-init)
    (foreign-declare "C_extern void swig_sdl_init(C_word,C_word,C_word)
C_noret;"))
(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!

What am I missing?

    Thanks, Joel

-- 
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums
Tenerife: Canary Islands: Spain





reply via email to

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