[plt-scheme] x != x for module names?!
Greetings.
I'm trying to use SWIG to wrap librdf in mzscheme, and have got stuck.
I've managed to build the extension .dylib (I'm on OS X 10.6), and put it in the appropriate build-path, but when I try to require it, I get
% mzscheme
Welcome to MzScheme v4.2.4 [3m], Copyright (c) 2004-2010 PLT Scheme Inc.
> (require "Redland.ss")
load-extension: expected module `Redland', but found module `Redland' in: /private/tmp/redland-bindings/compiled/native/i386-macosx/3m/Redland_ss.dylib
=== context ===
/Data/LocalApplications/PLT Scheme/PLT Scheme v4.2.4/collects/scheme/private/misc.ss:74:7
>
%
It's the 'expected module X but found module X' that's ground me to a halt -- I'm not sure how to debug this....
I'm following the instructions at <http://docs.plt-scheme.org/inside/overview.html> section 1.2.
The SWIG-generated wrapping code does appear to declare this:
% grep -C2 scheme_module_name Redland_wrap.c
return scheme_reload(env);
}
Scheme_Object *scheme_module_name(void) {
return scheme_make_symbol((char*)"Redland");
}
%
Calling (load-extension "Redland_wrap.dylib") does work, so it appears to be just this module problem that's stopping me taking over the world.
All the libraries being loaded are built 32-bit (it took me a while to work that one out!, but mzc --vv is my friend)
Incidentally, does anyone know if I have to include --xform with wrapper code generated from SWIG. My impression is not, but I can't find this confirmed anywhere.
Thanks for any pointers.
Best wishes,
Norman
--
Norman Gray : http://nxg.me.uk