필터 지우기
필터 지우기

code generation for c++

조회 수: 2 (최근 30일)
Waqar Ahmed
Waqar Ahmed 2021년 1월 10일
댓글: Nitin Kapgate 2021년 1월 13일
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
Waqar Ahmed
Waqar Ahmed 2021년 1월 10일
I am using matlab online What should I do
Nitin Kapgate
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 CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

제품


릴리스

R12.1

Community Treasure Hunt

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

Start Hunting!

Translated by