problem with External Functions

Discussion about the use of Simantics System Dynamics
Post Reply
mathew1105
Posts: 4
Joined: March 28th, 2017, 9:59 pm

problem with External Functions

Post by mathew1105 » March 31st, 2017, 12:15 am

Hi , i am trying to use a function that i created in C++ but the auxiliary variable where i define it seems not to run it. The value is always 0.000

I followed the tutorial , where you use a simple C code and none of the examples worked. Do i have to install a C compiler or do something else?

Thank you for your help
Tuomas Miettinen
Site Admin
Posts: 31
Joined: March 11th, 2013, 3:14 pm

Re: problem with External Functions

Post by Tuomas Miettinen » April 3rd, 2017, 10:12 am

The documentation was imperfect: to use C or C++ you need to use OpenModelica as the solver. So if you haven't already downloaded the Sysdyn version with OpenModelica included, you first need to do so. Then, you need to set the OpenModelica as the solver in the Preferences (Window -> Preferences -> Solver). The installation package with OpenModelica has also MinGW C compiler included that allows to build object files from C source code.
mathew1105
Posts: 4
Joined: March 28th, 2017, 9:59 pm

Re: problem with External Functions

Post by mathew1105 » April 29th, 2017, 9:10 pm

Thank you very much , that solved my problem :)
Post Reply