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

Libraries not included in FMU

Libraries not included in FMU

Hi,

I hope I haven't missed a thread discussing the issue I am encountering.
I have a Modelica model which uses an external C function defined as

Code:

  external "C" modelicaToSimulator(moduleName,

                                    functionName)
    annotation (Library={"SimulatorToFMUPython35"},
      LibraryDirectory={"modelica://SimulatorToFMU.Resources/Library"},
      IncludeDirectory="modelica://SimulatorToFMU.Resources/C-Sources",
      Include="#include \"pythonWrapper.c\"");

The .dll SimulatorToFMUPython35.dll is in the Resources/Library/win32 of the package SimulatorToFMU which contains the model.
When I exported the model as an FMU with the 32 bit of OpenModelica v1.11.0 on Windows, it did not include the dll in the FMU.
Consequently the FMU cannot be used in any tool.
Do you know why OpenModelica fail to include the dll in the FMU?

BTW: I did the same export using Dymola and the .dll was correctly included in the FMU.

Thanks for any help.

Thierry

Edited by: Nouidui - Apr-27-17 23:48:59

Re: Libraries not included in FMU

Yeah, this is a feature we don't support yet.
We should collect all library dependencies and add them to the fmu.

Re: Libraries not included in FMU

As a workaround, you could manually add it to the fmu binaries/platform using 7zip or some other zip software for now.

Re: Libraries not included in FMU

Thank you.

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