Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OM 1.8.0 cannot build simulators

OM 1.8.0 cannot build simulators

I've installed OM 1.8.0 (r 10584) for Windows in the folder:
c:\programmi\OpenModelica

I've tried to run a model that used to work correctly. The model name is:
   FrazAbbass.mo
It is located in the folder:
   C:\Documents and Settings\ceraolo\My Documents\OM\Working\4_Frazionat

When I run it  within OMEdit, I get the following error message:

Translation    10:43:56        0:0-0:0    Error building simulator. Buildlog: The system cannot find the path specified.
gcc  -O3 -falign-functions -msse2 -mfpmath=sse   -I"C:/Programmi/OpenModelica//include/omc" -I. -L"C:/Documents and Settings/ceraolo/My Documents/OM/Working/4_Frazionat"   -c -o FrazAbbass.o FrazAbbass.c
'gcc' is not recognized as an internal or external command,
operable program or batch file.
\MinGW\bin\mingw32-make: *** [FrazAbbass.o] Error 1

I looks like OM cannot find the gcc compiler, but I don't know how to fix this.

Any ideas?
Massimo

Edited by: ceraolo - Nov-27-11 13:00:07

Re: OM 1.8.0 cannot build simulators

The problem mostly lies with your settings and the compile script in
C:\Programmi\OpenModelica\share\omc\scripts\Compile.bat
In the compile script we do cd to C:\Programmi\OpenModelica\MinGW
to set the path to it, then we cd back to your working directory.

It seems that the path settings to MinGW are not done correctly.
You can remove some of the REM in the .bat file to get more output out of the Compile.bat script
and see what the problem is.

Cheers,
Adrian Pop/

Re: OM 1.8.0 cannot build simulators

I checked and found that in compile.bat the 8th line was:
    set MINGW=%OPENMODELICAHOME%\MinGW

But my OPENMODELICAHOME environment variable is:
C:\Programmi\OpenModelica\

So I'd just to eliminate the final character (character "\") in the OPENMODELICAHOME environment variable.
After this simple modification everything is ok.
What is actually strange is that I never knew about this environment variable, that shoud therefore have been set by OM itself during installation!

Massimo

Re: OM 1.8.0 cannot build simulators

I might be that cd /d "c:/Programmi/OpenModelica//MinGW/bin" fails because of the double //.
Is strange anyway, as i have the same \ at the end of my OPENMODELICAHOME and is working fine.
Maybe cd has some weird and undocumented /P switch that we don't know about?

I'll play with it and see what's the issue.

Cheers,
Adrian Pop/

There are 0 guests and 0 other users also viewing this topic
You are here: