MATLAB Answers

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

73 views (last 30 days)
Ramon Andino
Ramon Andino on 6 Mar 2015
Answered: cui on 12 Oct 2019
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"

  0 Comments

Sign in to comment.

Answers (2)

Ryan Livingston
Ryan Livingston on 6 Mar 2015
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.

  0 Comments

Sign in to comment.


cui
cui on 12 Oct 2019
in windows vs, it is here: C:\Program Files\MATLAB\R2019a\extern\include

  0 Comments

Sign in to comment.

Sign in to answer this question.