[plt-scheme] Dynamic loading of multiple mzscheme modules on hpux built with SWIG

From: Tim Brown (tim.brown at cityc.co.uk)
Date: Fri Feb 11 12:30:44 EST 2005

Folks,

I have build a collection of modules for mzscheme (209) using SWIG:

Version 1.3.24
...
Compiled with aCC [hppa2.0w-hp-hpux11.00]

I am using "mzc" (using  the HP aCC compiler) to build and link them.

I am fine loading up my first module:

   (require (lib "module1.ss" "ccl"))

But when I go to require my second module:

   (require (lib "module2.ss" "ccl"))

I end up with the following error in Scheme:

   require: unknown module: |,/usr/local/plt/collects/ccl/module2|

I have isolated this fault down to module2's scheme_initialize()
attempting to call its own scheme_reload(), but picking up the
scheme_reload() in module1.

How do I build shared libraries which call their own functions
themselves. Remember that I am limited by:

1. the modules are auto-generated by swig, and therefore I can't
    delegate the scheme_reload functionality to a static function

2. mzscheme contracts me to use those names, by its "module" API.

3. as much as I may love gcc, I am stuck with acc/aCC so I *really*
    need compiler/linker flags for those.

Thanks very much in advance for you help.

Regards,

Tim Brown


-- 
Tim Brown <tim.brown at cityc.co.uk> |            City Computing Limited |
T: +44 20 8770 2110               |      City House, Sutton Park Road |
F: +44 20 8770 2130               |       Sutton, Surrey, SM1 2AE, GB |
BEAUTY: What's in your eye when you have a bee in your hand.__________/



Posted on the users mailing list.