R2016b mcc failure "Could not determine class of method"

Hi,
I call mcc as follows (both from MATLAB and from command-line mcc):
mcc -C -m /path/to/mccHelloworld.m -a /path/to/my/libraries
And I get the following error in one of the libraries:
Error using matlab.depfun.internal.MatlabSymbol/proxy (line 428)
Internal Error: Could not determine class of method
"/path/to/library/src/@medicalDataset/medicalDataset.m".
Number of classes checked: 19.
and mcc quits with a segmentation violation and "return status = 137 (0x89)". mcchelloworld.m is just a method that displays 'hi';
The file medicalDataset.m there is a class definition (you can actually see it on github). If I omit that particular piece of code (medicalDataset.m) from the libraries path, then the error is thrown by another class definition somewhere else.
I've looked online and the closest I've come to is this: https://www.mathworks.com/matlabcentral/answers/159977-internal-error-could-not-determine-class-of-method , but the suggestion there doesn't seem to fit here.
The code compiles fine with R2013b's mcc.
Anyone have any suggestions or pointers?
Thanks!

4 Kommentare

Hi any chance you managed to solve this? Getting the same error are you are. Thanks
I had a long conversation with MathWorksabout this. It's been a couple of years, and I don't remember the final answer, but from what I gather from the emails, the key was setting the environment variable "MCC_USE_DEPFUN" to 1. I think in the end this only worked for me from inside matlab (rather than running mcc from the command line)
So from inside MATLAB do
setenv('MCC_USE_DEPFUN','1')
and make sure all your libraries are on your path using
addpath(genpath(...))
Then run your mcc command (inside MATLAB still).
Marvic Attard
Marvic Attard am 12 Jun. 2018
Bearbeitet: Marvic Attard am 12 Jun. 2018
Works perfectly THANKS!
Problem still persisting with R2022a.
Adding all my package folders with -a .\framework\+SomeMath -a .\framework\+SomeLogger
gives me the exact behaviour, reporting different classes with the "could not determine class of method" error.
After adding .\framework folder to the matlab path, it compiles again.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 1 Dez. 2016

Kommentiert:

am 15 Jul. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by