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.
Maltab 2022 coder doesn't produce required structs.
1 次查看(过去 30 天)
显示 更早的评论
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);
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!