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

Simulation failed. g++ not found

Simulation failed. g++ not found

I am getting the following error when running OMNotebook:

record SimulationResult
    resultFile = "Simulation failed.
Error: Error building simulator. Buildlog: command g++ not found. Check $OPENMODELICAHOME
Error: Error building simulator. Buildlog: command "C:\Program Files\OpenModelica1.5.0\/bin/Compile" not found. Check $OPENMODELICAHOME
"
end SimulationResult;

I have OPENMODELICAHOME defined correctly in the environment variables, = "C:\Program Files\OpenModelica1.5.0\"

Re: Simulation failed. g++ not found

Hi,

I think the problem is that you installed OpenModelica in Program Files which has a space in it.

The problem with that is that the MinGW gcc compiler doesn't support spaces in the paths, see here:
  http://www.mingw.org/wiki/Getting_Started
"... we strongly recommend that you do not install MinGW in any location
with spaces in the path name reference; i.e. you should avoid installing
into any subdirectory of "Program Files" or "My Documents", or the like."

Try re-installing OpenModelica in a path (directory) that contains no spaces.
If this doesn't work post back and we'll do more investigation.

Cheers,
Adrian Pop/

Re: Simulation failed. g++ not found

Hi,
I have probably the same problem but I'm running OMShell under ubuntu 9.10....

simulate(HelloWorld, stopTime = 2)
record SimulationResult
    resultFile = "Simulation failed.
Error building simulator. Buildlog: g++ -I"/usr/lib/omc/include" -msse2 -mfpmath=sse  -I. -o HelloWorld HelloWorld.cpp -lsim -L"/usr/lib/omc/lib" -lc_runtime -lf2c -lsendData -lQtNetwork -lQtCore -lQtGui
/bin/sh: g++: not found
make: *** [HelloWorld] Error 127

Error building simulator. Buildlog: command "/usr/lib/omc/bin/Compile" not found. Check $OPENMODELICAHOME
"
end SimulationResult;

How to fix this??

thank you,
Frank

Re: Simulation failed. g++ not found

sudo apt-get install build-essential

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