matlab to c++: Cannot open include file: 'mclmcrrt.h': No such file or directory

user427046 picture user427046 · Aug 21, 2010 · Viewed 7.9k times · Source

We tried to complie the m file to c++ file by matlab complier. We had the file bulit but we got the error msg as follow.

fatal error C1083: Cannot open include file: 'mclmcrrt.h': No such file or directory

Do you have any ideas about the error msg? Any suggestion will be appreciated. Thanks a lot.

Ying

Answer

Andrey Rubshtein picture Andrey Rubshtein · Dec 18, 2011

This error message is caused because you need MCR dlls. You should locate the h file in "C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v715\extern\include\"
and add it to your include path in C.

Check out the manual of Matlab compiler.