This is a companion question to External Functions: Reference headers in C-script to compiled dll.
That stack overflow question is using a Modelica external function cal