On Thu, 28 Jun 2007 12:10:01 +0200, Raphael Collet
<[EMAIL PROTECTED]> wrote:
Pavel wrote:
Hi,
I am wondering if it's possible to import a shared object into a
program twice.
Basically, what I want to do is:
[G] = {Module.link ['object.so{native}']}
[H] = {Module.link ['object.so{native}']}
with G and H becoming separate objects with separate internal states.
Is there some simple solution for that?
Yes, use Module.apply instead of Module.link. The documentation of
Module explains this very well.
Thanks for your reply, but I am afraid I need some more assistance with
the issue.
When I simply change link to apply I get this error:
%***************** Error: illegal field selection ***************
%**
%** In statement: 'js.so{native}' . 'import' = _<optimized>
%**
%** Call Stack:
%** procedure 'UnsitedBaseManager,APPLY/fast' in file
"/Users/maparent/Programmation/mozart/share/lib/init/Module.oz", line 115,
column 6, PC = 25350784
%** procedure 'BaseManager,apply' in file
"/Users/maparent/Programmation/mozart/share/lib/init/Module.oz", line 180,
column 6, PC = 25258432
%**--------------------------------------------------------------
With link, things work fine so I am assuming that the error is not with
the shared object, but with what I am sending to the apply method.
Documentation appears to be unclear on what exactly it expects to receive.
Any tips?
/pavel
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users