Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Using a DLL with Linux

0 votes
430 views
Hi

I run PLECS on Linux. I have C-Code that i would like to convert into a DLL.

I find the DLL block in the library and the header file in /include/plecs/DllHeader.h

However the documentation talks only about DLL generation for windows. Could someone provide a few lines of howto go about it for Linux with gcc (No visual studio, please)

I could generate a .so file (Please let me know any special compiler flags that need to be passed to gcc). Do i just rename it as a 'dll'
asked Jul 13, 2020 by srinath (26 points)

1 Answer

0 votes
Hello,

Please see the DLL block description where it mentions that Linux DLLs are supported (.so files, usually using the ‘-shared’ option for gcc). We do not provide support on creating a DLL file for Linux environments, but there are many resources available for this on the internet, see e.g. https://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html.

Best regards,

Kris
answered Jul 13, 2020 by Kris Eberle (1,575 points)
...