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

External Objects and external functions

External Objects and external functions

Dear All,

I'm trying to write a model with an external object and and an external function, very close to example "ExtObj.mo".
Then I receive a message from the compiler and I find this in the model_functions.cpp :

  mmc__unbox__mmcExpTypeShort:ERROR_rettype tmp3;

Could somebody help me ?

Regards

Re: External Objects and external functions

Are you using MDT? If so you might have to switch to Modelica grammar instead of MetaModelica.

Re: External Objects and external functions

Dear sjoelund

Thank you for your answer.

Yes, I'm using MDT, only to have a check of the syntax.
But I'm using the "console OMC" inside Eclipse to generate the cpp and exe code by a call to simulate(model).

Is there a difference between "omshell" and the console OMC inside eclipse ?

Thank you for your support

F CHEVALIER

Re: External Objects and external functions

Well, the main difference is that MDT is also used for OMC development, which requires +g=MetaModelica for code completion. +g=Modelica makes it the same as OMShell (minus some OMShell specific features like tab-completion of commands like simulate(), if MDT doesn't have that).

Re: External Objects and external functions

Thank you  very much.
It works with OMshell.

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