Effacer les filtres
Effacer les filtres

code generation for c++

2 vues (au cours des 30 derniers jours)
Waqar Ahmed
Waqar Ahmed le 10 Jan 2021
Commenté : Nitin Kapgate le 13 Jan 2021
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 commentaires
Waqar Ahmed
Waqar Ahmed le 10 Jan 2021
I am using matlab online What should I do
Nitin Kapgate
Nitin Kapgate le 13 Jan 2021
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Produits


Version

R12.1

Community Treasure Hunt

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

Start Hunting!

Translated by