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

Create FMU for several platforms

Create FMU for several platforms

Hello,

I want to create FMUs with binaries for Windows and Linux, both 64 bit, inside.

I am running a 64 bit Windows 10 and tried to stick to https://trac.openmodelica.org/OpenModelica/ticket/3775

My .mos looks like the following:

Code:

OpenModelica.Scripting.loadFile("grid.mo"); getErrorString();

setCommandLineOptions("-d=newInst"); getErrorString();
setCommandLineOptions("-d=initialization"); getErrorString();
setCommandLineOptions("--simCodeTarget=Cpp"); getErrorString();
setCommandLineOptions("-d=-disableDirectionalDerivatives"); getErrorString();


OpenModelica.Scripting.buildModelFMU(grid.network, version = "2.0",
  fmuType = "me", platforms = {
    "x86_64-w64-mingw32"}); getErrorString();

Every time i write a specific platform, i just receive errors that something cannot be found.

What do I need to write down and what do I need to install to get it running?

Any help would be really welcome :-)

Best regards

Henrik

Re: Create FMU for several platforms

This is not possible on Windows. You need Linux with cross compilers installed.
Either use WSL Windows subsystem for Linux or our Vitual Machine.

Edited by: adrpo - Apr-02-20 20:21:31
There are 0 guests and 0 other users also viewing this topic
You are here: