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!