Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColor#F7D6C1
borderStyledashed

PUBLIC FUNCTION get_c_att_name ( idx ) &
RESULT(res)
...
CHARACTER (LEN=40) :: res
res = c_att_name(idx)
END FUNCTION get_c_att_name

4. OpenMI on Mono in five steps
4.1. Download from SourceForge

...

3. How to port a C# wrapper from Windows to Linux

3.1. General

The Mono Guidelines Interop with Native Libaries gives general information about the interface between managed and unmanaged code.

The wrapper has three layers:

  • <engine>DllAccess.cs is the inner layer;
  • <engine>DotNetAccess.cs;
  • <engine>Wrapper.cs is a LinkableComponent and the outer layer.
    Compilation of the two inner layers:
    Panel
    bgColor#F7D6C1
    borderStyledashed

    gmcs -target:library -out: <engine>DotNetAccess.dll <engine>DllAccess.cs
    <engine>DotNetAccess.cs
    Compilation of the outer layer:

    Panel
    bgColor#F7D6C1
    borderStyledashed

    gmcs -target:library -out:<engine>Wrapper.dll -pkg:baw-geidotnet.pc,
    openmi-backbone.pc,openmi-devsupport.pc,openmi-spatial.pc,
    openmi-standard.pc,openmi-wrapper.pc *.cs
    -pkg: <name>.pc file (path and name) with information about a referenced shared library