code generation for c++

2 次查看(过去 30 天)
Waqar Ahmed
Waqar Ahmed 2021-1-10
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