How to deploy large library as multiple executables?

조회 수: 7 (최근 30일)
Stuart
Stuart 2018년 1월 6일
댓글: Walter Roberson 2018년 1월 8일
We have a large library of "core" MATLAB code as well as multiple "top level" MATLAB functions that make use of the core. I have been tasked with making these top level MATLAB functions available as executables. I started using mcc to generate the required executable files and they work, but the generated executable files are very large and take a very long time to build. Each of the top level functions uses a large part of the core library (and the core is huge) so most of the core is being included in each executable. Eventually we will have dozens of executables and I would like to avoid an hour long build process.
I experimented with using mcc to create shared libraries of the core and then using those DLLs in the top level functions. I stopped because I could not get the libraries to load using loadlibrary. Assuming I can get loadlibrary to work, is this even the right approach to this problem? I want the developers to be able to work in pure MATLAB (rather than using the DLLs) so they can work faster. To do this, would I wrap the calls to loadlibrary in a check of isdeployed?
  댓글 수: 5
Stuart
Stuart 2018년 1월 8일
편집: Stuart 2018년 1월 8일
We need to make the functionality available to third parties without making the code available to them. Using pcode is an option, but the Mathworks documentation states It is not recommended that you P-code files to protect your intellectual property.
Thanks for pointing out the limitation in loadlibrary. Is there a better overall solution to this problem?
Walter Roberson
Walter Roberson 2018년 1월 8일
One approach to achieve separation would be a client-server architecture.
Possibly using MATLAB Coder to generate C code might help speed the process, in that at least in theory the makefile could detect the C was already compiled to object.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by