Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.7K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Creating a DLL file and use it with System Modeler

Posted 10 months ago
2 Replies

Dear Ian,

Following your answer as well as with informations from Ankit and ChatGPT I could have something working! Thanks for your help.

I share what I did below :

I worked with 2 elementary "add" and "subtract" functions.

example.c code :

enter image description here

example.h code :

enter image description here

Then to compile I used the x64 native tool command prompt of Visual studio 2022 with the following command :

cl /LD example.c /Fe:example.dll /DDLL_EXPORT

Modelica function code : enter image description here

For some reason that I don't understand I had to write the full path for the .h file. It didn't work with the "modelica://" shortcut...

Posted 10 months ago

You never mentioned an exports file and the definition of RhoH2OTempDLL does not start with extern "C" __declspec(dllexport). Seeing that symbols are hidden by default on Windows, that would be the first thing I would verify.

POSTED BY: Ian Hojnicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard