C Library, AnyScript, Interface

Is there a way to use a c library in AnyScript?

It is possible to call C libraries from D. What you need to do is to convert the C header files to D. For the most part, this is pretty straightforward, and there is a hard-to-use command-line tool to help automate the process.

Regards
Lewis

Hi Lewis,

thank you for your reply. Unfortunately, calling the C libraries from D won’t help me, as I want to use the C functions as well as their results within the main study of my model (for every simulation step).

Regards

Hi SAGA,

Sorry for the slow answer yes this is possible,

Please see the object AnyFunExMonoC in the reference manual it contains a small example which shows how to do it.

Usually we use python AnyFunExMonoPy it is easier to work with.

Best regards
Søren

Hi Søren,

thank you very much for your answer. This is exactly what I needed!

Best regards

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.