MATLAB Compiler SDK command line interface for .net

5 ビュー (過去 30 日間)
Hannes H.
Hannes H. 2017 年 11 月 10 日
コメント済み: Hannes H. 2017 年 11 月 13 日
Hi
how can i compile a .net library using Matlab Compiler SDK via command line? I tried this:
mcc -l PATH\MATLAB\GetPlot
and i'm getting the output as you can see in the image attached.
There is a .dll but i can't use it for c# applications. Do i need to specify it somehow in the command?
Thanks!

採用された回答

Kojiro Saito
Kojiro Saito 2017 年 11 月 10 日
mcc with -l option will create a C shared library and it's not .NET.
This document describes how to create .NET Assembly by mcc command. You need to add -W option.
mcc -W dotnet:assembly_name,className,framework_version,security,remote_type -T link:lib options mfilename1,...,mfilenameN
mcc -W dotnet:assembly_name,className,framework_version,security,remote_type -T link:lib options class{className:mfilename1,...,mfilenameN}
For exmaple,
mcc -W 'dotnet:dotNetSample,Class1,4.5,private' -T link:lib -v dotNetSample.m
will create .NET 4.5 libraries (dotNetSample.dll and Class1.cs and so on) from dotNetSample.m.
  1 件のコメント
Hannes H.
Hannes H. 2017 年 11 月 13 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by