Hello
I am trying to build a propagator in Mozart. I am using the code that can be
found in the tutorial
"AdvancedMaterial>ImplementingPropagators>gettingStarted", which uses the
C/C++ interface. I am using win2000, gcc 2.95 and Mozart 1.2.4.
I had created the shared object as follow:
oztool c++ -c propagator.cc -o propagator.o
oztool ld propagator.o -o propagator.so-win32-i486
If I write an executable module using the propagator object and compile it
into an application with:
ozc -c propator.oz -o propagator.oza
and run it with:
ozengine propagator.oza
it works fine. The code of propagator.oz is:
%%%%%%%%%%%%
functor
import
Propagator at 'C:/propagator.so{native}'
Browser
define
D E F
{Browser.browse [D E F]}
[D E F] ::: 0#10
{Propagator.add D E F}
D :: [1 3 5 7 9]
E :: [1 3 5 7 9]
E <: 5
E \=: 3
end
%%%%%%%%%%%%
But when I try to use the shared object from the Mozart OPI, Mozart freezes,
it does nothing. The code that I 'd tried to run from the OPI is:
%%%%%%%%%%%%%
declare
D E F
[FD_PROP] ={Module.link ['C:/propagator.so{native}']}
[D E F] ::: 0#10
{FD_PROP.add D E F}
D :: [1 3 5 7 9]
E :: [1 3 5 7 9]
E <: 5
E \=: 3
{Browse [D E F]}
%%%%%%%%%%%%%%
Do you Know what is the problem? Do you know another way of doing
propagators and use them from Mozart?
Thanks a lot
-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs@mozart-oz.org.