How to get Compiler SDK to find matlab.cod​etools.req​uiredFiles​AndProduct​s when compiling C++ shared libraries?

6 views (last 30 days)
I am using the Compiler SDK toolbox to compile MATLAB code into a C++ header file, a .lib, and a .dll. Then, I am linking the compiled code and libraries into a C++ application as a plugin.
So far, I have been able to successfully link the compiled code into my application; however, during runtime, I get an error (from the compiled MATLAB portion) which I have copied below.
*Undefined variable "matlab" or class "matlab.codetools.requiredFilesAndProducts"
Unfortunately, I am constrained to version 2015b at the moment...and 2015b is when Mathworks deprecated depfun which used to provide the same functionality as matlab.codetools.requiredFilesAndProducts.
My initial guess is that matlab.codetools is not compatible with the Compiler SDK because the MATLAB code runs perfectly from the MATLAB command line, but I haven't been able to find any confirmation of this incompatibility online. Has anyone else run into this issue and found a workaround?
Thank you,
Alan

Accepted Answer

Sean de Wolski
Sean de Wolski on 3 Aug 2018
I don't see it explicitly mentioned here but depfun was:
If you check the mccExclude log it will say.
Why do you need that in compiled code? The available source code will not be changing.

More Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!