3

I'm trying to export a test model of the ExternalMedia library to FMU. When converting the model to FMU I get errors, with both, Visual Studio 2010 and MinGW GCC compilers. The model simulates well in Dymola with VisualStudio, but the export as FMU fails.

I usually start-up Dymola with a mos-Script, setting the working directory, adding a Modelica path and importing the used libraries. The mos-script looks like this:

cd("D:\Projekte\xxx\Modelica");

AddModelicaPath("D:\Projekte\xxx\Modelica\Library", erase=false);

import ExternalMedia.*;

openModel("D:\Projekte\xxx\Modelica\MyModel.mo");

When looking for the environment variable MODELICAPATH, I cannot find it. It’s not defined on my machine. Why? Installation issue? And could this be the problem?

The test model from the ExternalMedia library

github.com/modelica/ExternalMedia

can be found at ExternalMedia.Test.TestMedium.TestConstants

Attached you can find the output error messages of dymola (buildlog.txt) for the two cases:

Case 1: Windows7, Dymola 2016, VisualStudio 2010 Express -> simulation OK!

[https://www.dropbox.com/s/h2au1say0td20q1/buildlog_VisualStudio2010Express_Compiler.txt?dl=0

][1]

Case 2: Windows 7, Dymola 2016, MinGW GCC -> Error during translation, no simulation possible

[https://www.dropbox.com/s/tu640zm1ydtmuls/buildlog_MinGW_GCC_Compiler.txt?dl=0][2]

Where do the errors come from? ExternalMedia, Dymola, FMI settings, or is it due to system settings (windows environment variables etc.)?

T. Sergi
  • 203
  • 2
  • 9
  • I think the AddModelicaPath() function only works temporarily within the current Dymola process, it won't add anything to the Environment variable. I am not really sure how it happened with the compiler, it might relate to some settings for the static lib in ExternalMedia and Dymola FMU export are different, but I am not really sure how to resolve this. You could probably try to export the source code and compile it offline. – Hang Yu May 05 '16 at 12:26

0 Answers0