Xcode can not find tmwtypes.h file from code generated using Matlab Coder

조회 수: 68 (최근 30일)
Ramon Andino
Ramon Andino 2015년 3월 6일
댓글: Ryan Livingston 2020년 10월 15일
I've translated a Matlab algorithm using Matlab Coder. I am in the process of integrating it into a dummy Xcode project. I'm getting the following error:
"tmwtypes.h" file not found
When I searched through the generated code I did confirm that no such file was generated. When I commented out the line, the same issue emerged for:
  • "mex.h"
  • "emlrt.h"

답변 (2개)

cui,xingxing
cui,xingxing 2019년 10월 12일
in windows vs, it is here: C:\Program Files\MATLAB\R2019a\extern\include
  댓글 수: 1
Ryan Livingston
Ryan Livingston 2020년 10월 15일
You can also use packNGo to package dependencies of the generated code. That knows how to search for such files.

댓글을 달려면 로그인하십시오.


Ryan Livingston
Ryan Livingston 2015년 3월 6일
It appears that you have generated MEX code rather than standalone code. MEX C/C++ code is designed to be compiled and run in the MATLAB environment. Whereas standalone code is designed to be run outside of MATLAB.
When generating code, use one of the non-MEX build targets:
codegen foo -args {1} -config:lib
The documentation has more information on the standalone targets, LIB,DLL,EXE and how to specify which one is active.
  댓글 수: 2
Sam
Sam 2020년 10월 14일
Dear Ryan,
I have a similar issue with the simulink coder. I am currently working on a simple example in which I want to convert a simulink subsystem (two inputs and one output) which has the following function: y = x1-x2.
I want to convert this block to c-code and to use and integrate this code on a TI TMS570LS microcontroller.
I would like to integrate the generated code into my excisting "code composer studio" (CCS) project.
In the Simulink "Code Generation" setting, I have selected grt.tlc as the target system file. If I do this, CCS requires a lot more header files which are not included in the generated simulink coder folder and these headers seems to be only required in conjunction with MATHWORKS (which I dont want on my microcontroller).
Thank you a lot
Sam
Sam 2020년 10월 15일
In the meantime I found the solution. One needs to activate the "Package Code and Artifacts" option in "Code Generation" Settings. Within the generated package, one finds the folder with the required MATLAB headers.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by