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

Real array to external c function

Real array to external c function

Hi,
I need to pass a Modelica (real) array to a external object. The function looks like this:

function addSurfaceObjectData "addSurfaceObjectData"
  input Blender.Types.SurfaceObject component;

  input Real[:,:] X;
        ...
  external "C" addSurfaceObjectData(component, X);
end addSurfaceObjectData;

The corresponding c-function is something like:
void addSurfaceObjectData(void* object, double * x_array) {..

As far as I remember, this is currently not implemented in OpenModelica. Is that right?
Is there any workaround?

Frank

Re: Real array to external c function

No really good workaround yet. Also see https://openmodelica.org:8443/cb/issue/1499 , which is the same as this bug current/smile

(Actually, just passing the array is working in the trunk; it's only passing array dimensions that is a problem. The latest Windows nightly build is probably too old though)

Re: Real array to external c function

thanks

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