I cannot compile any MATLAB MEX code due to the following error:
In file included from /Applications/MATLAB_R2013a.app/extern/include/mex.h:58:
In file inclu
I just add my own experiment (C++ only). The
#define char16_t uint16_t
was causing some problem in the other parts of the mex file. In fact, subsequently to my mex file, char16_t
was properly defined. By tracking the chain of includes, the proper type char16_t
is set in a file named __config
:
typedef __char16_t char16_t;
which is also the first file included from <algorithm>
. So the hack consists in including algorithm
before mex.h
.
#include <algorithm>
#include "mex.h"
and the proper settings are performed, still in a multiplatform manner and without changing anything in the build configuration.