Am Dienstag, 24. Juni 2008 12:17 schrieb Adrian Pop:
> Hi,
>
> These problems have nothing to do with OMShell.
>
> We should change in the documentation that:
> >> system("cat bubblesort.mo")
>
> returns a number and you should use:
> >> readFile("bubblesort.mo")
Thanks, that works!
> For dcmotor problem, are you sure you loaded the
> Modelica library before loading dcmotor.mo?
> loadModel(Modelica);
> loadFile("dcmotor.mo");
> ...
> Also make sure that OPENMODELICALIBRARY points
> to the directory containing Modelica standard library.
>
> To test what the problem might be:
> $ cd OpenModelica/Examples
> $ ../build/bin/omc sim_dcmotor.mos
> Now look for problems in all the *.log files generated.
Ok, that was a pointer in the right direction. I got it to work, but had to
write it like this:
env PATH="${PATH}:$(pwd)" omc sim_dcmotor.mos
I think I understand the problem; I would guess most of the development is
done in Windows, so the problem did not surface before.
In UNIX, to start an executable in the present folder, one has to
write "./executable", while in Windows it is just "executable.exe".
It seems to me that omc, when arriving at the step of running the compiled
executable, forgets the "./" part; putting the current folder in the PATH
environment variable solves the issue, but it's only a kludge - the real
solution should be prefixing "./" in the omc code, especially since it does
not cause problems when used in Windows.
Cheers,
-Federico
pgphHuWZpk6aZ.pgp
Description: PGP signature
