Filter löschen
Filter löschen

How to generate a DLL with Matlab Coder or Embedded Coder ?

11 Ansichten (letzte 30 Tage)
Michel
Michel am 26 Jul. 2011
Hello,
I use Matlab Coder for genereta .cpp and .h files coresponding to my .m function.
With the .cpp and the .h I create the .dll file on visual studio.
Is it possible to generate directly the .dll from matlab coder or embedded ?
Thank you for your help !

Akzeptierte Antwort

Desiree
Desiree am 26 Jul. 2011
Creating a dynamic library is currently not available with MATLAB Coder, only static libraries. One workaround can be to go through Simulink and place the code in a MATLAB Function block and then use Embedded Coder's Shared Library Target (ert_shrlib.tlc) to create the DLL directly. You would need Simulink Coder also in this case. The other workaround is to create the DLL externally in an IDE as you already do. MathWorks development is looking into adding this feature for MATLAB Coder. MATLAB Compiler on the other hand can be used to create DLLs out of your MATLAB Code directly, however it does not include the step of C code generation, but works with a runtime that needs to be installed on the target system to be able to use the DLL.
  2 Kommentare
Michel
Michel am 26 Jul. 2011
Thank You,
I have Simulink Coder but no Compiler, I'll try with Simulink Coder
Ganesh
Ganesh am 18 Okt. 2012
The capability to generate dll from m-code has been incorporated in MATLAB R2012a. http://www.mathworks.com/products/new_products/MATLAB_Coder_R2012a.pdf

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by