Matlab Builder NE exception with supposedly toolbox support?

4 vues (au cours des 30 derniers jours)
Joe
Joe le 21 Mar 2012
I have successfully built my series of M script files (including Pairs.m) with deploytool in the Matlab Builder NE toolbox. I also checked the support setting of the package build to ensure the Econemtric toolbox function I am calling which is egcitest. Everything seems to bridge ok between my C# application and the Builder NE toolbox generated DLL. When it calls egcitest, I get a strange exception from Matlab Compiler Runtime (MCR) which is:
.. MWMCR::EvaluateFunction error ... Error using ==> load Unable to read file Data_EGCITest: No such file or directory. Error in => Pairs.m at line nn
How is this possible if the Matlab Builder NE setting includes the support of egcitest from the Econometrics toolbox. Can anyone help me on this? I am using Matlab 2011a and Visual Studio 2010 Ultimate. Thanks

Réponse acceptée

William Mueller
William Mueller le 23 Mar 2012
This is not a bug in EGCITEST or DEPLOYTOOL.
The dependency analysis that the MATLAB Compiler carries out at compile time is unable to pick up the dependency on the data file since it’s not MATLAB code. Any data files that are referenced from code that is being deployed need to be added explicitly to the project.
To do this, add the .mat file to your DEPLOYTOOL project. Drag $MATLABROOT/toolbox/econ/econ/Data_EGCITest.mat into the project where it says “add files/directories” in the Build tab of DEPLOYTOOL. If compilation is being done on the command line using the MCC command, this dependency would be resolved using the -a option to MCC:
-a fullfile(matlabroot, toolbox, econ, econ, Data_EGCITest.mat)
o Dave Lane (MathWorks Quality Engineering)
o Bill Mueller (Econometrics Toolbox)

Plus de réponses (1)

owr
owr le 21 Mar 2012
I dont think you've run into any incompatabilities - just a bug.
"Data_EGCITest.mat" is a mat file used by the egcitest function to load critical values. For various reasons the path on your target machine can't locate this file, or its just not there. Perhaps try including it as an additional file in your deployment project. You can find the file here:
"matlabroot"\toolbox\econ\econ
where "matlabroot" is wherever you installed MATLAB.
This is worth reporting to the Mathworks as a bug. You can see in egcitest.m where this file is loaded. In 2011a its on line 350:
load Data_EGCITest EGCV
Good luck.

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by