Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

how to compile the c code into the dll file?

Please login with a confirmed email address before reporting spam

Currently I am dealing with a solid mechanics problem which need to call an External Material Node from comsol, I already have written the C code but I don't know how to
complie the C code into a dll file ? Could anyone tell me the details?
I try to use the Visual Studio 2013 to compile the C code 'linear_elastic.c' from the web "cn.comsol.com/model/external-material-examples-structural-mechanics-32331"
to a dll file, however, the comsol cannot read the dll file and report "Error in multiphysics compilation.Error initializing external variables interface.- Function: eval". As the C code is correct, it seems that I did not operate the VS well, please tell me how to compile the C code to a dll file exactly fitting comsol grammer, by using what kind of software?

0 Replies Last Post Aug 3, 2017, 12:25 p.m. EDT
COMSOL Moderator

Hello Zhipeng Pi

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.