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.
2 ビュー (過去 30 日間)
古いコメントを表示
Oguz Kaan Hancioglu
2023 年 2 月 15 日
回答済み: Oguz Kaan Hancioglu
2023 年 2 月 22 日
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!