code generation for c++
조회 수: 2 (최근 30일)
이전 댓글 표시
I am getting this error while compiling the code generated through code generator
fatal error C1083: Cannot open include file: 'tmwtypes.h': No such file or directory
matlab command for the function he.m i used for code generation is
codegen he -lang:c++ -config:lib
댓글 수: 3
Nitin Kapgate
2021년 1월 13일
The header file ('tmwtypes.h') is missing from the generated files because all the files which are a part of MATLAB installation (present in the ‘MATLABROOT\extern\include’ directory) does not get copied in the folder of the generated code.
It is expected that since these files are already available in the MATLAB directory, to compile these files we just need to include the path of these files in the ‘include’ directory of the external compiler.
In contrast, other MATLAB files (like rtwtypes.h) are generated because these files are not available in the MATLAB installation directory. These files are customized to the specific project for which code is generated and are not generic files.
As a workaround, to get all the files in the generated directory, package option can be used which will create a ZIP folder with all the files included. This option can be used if the generated code need to be relocated to another development environment. For details on this please refer to the below link:
In addition, the necessary files to include in the external compiler may be found in the MK file, if the Coder is set to generate one.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Adding custom doc에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!