Maltab 2022 coder doesn't produce required structs.

2 vues (au cours des 30 derniers jours)
Oguz Kaan Hancioglu
Oguz Kaan Hancioglu le 15 Fév 2023
I am trying to upgrade matlab version to 2022a. My current matlab version is 2017a. I am using Matlab coder to get dll file from m files.The codegen output funcname_emxutil.h uses funcname_cb_struct_T and funcname_emxArray_real_T structs defined in funcname_types.h. If I use matlab 2017a, these structs are generated from codegen and located in funcname_types.h. However, If I use matlab 2022a, these structs are not generated from codegen and build fails due to undeclared identifier.
While Matlab 2017a uses Visual Studio 2013, Matlab 2022a uses Visual Studio 2022. My codegen configuration is listed below.
cfg = coder.config('dll');
cfg.TargetLang = 'C++';
%cfg.TargetLangStandard = 'C++11 (ISO)';
cfg.MaxIdLength = 256;
cfg.GenCodeOnly=1;
cfg.CustomSymbolStrType = [funcName,'_$M$N'];
cfg.PassStructByReference = true;
cfg.PostCodeGenCommand = 'AddCurlyBrace2ForLoops(projectName, buildInfo)';
cfg.Verbose = true;
codegenStr = sprintf('codegen -config cfg -d %s %s -args {%s} -globals {%s}',outDir,funcName,inputStr,globStr)
eval(codegenStr);

Réponse acceptée

Oguz Kaan Hancioglu
Oguz Kaan Hancioglu le 22 Fév 2023
Matlab 2022a doesn't generate the funcname_emxutil.h since there is no dynamic array in my m file. The existing funcname_emxutil.h file inhibit the build processes.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by