Problem with #includes in mex file (seems to find the files, but creates a lot of errors - see below)
1 次查看(过去 30 天)
显示 更早的评论
When I have a mex-file that works fine (with standard mex-includes) and then I simply put a new #include on top (without otherwise changing the code), I get 100s of error-messages like the ones below. It doesn't seem to matter, which includes. For example, I needed a better random number generator, so I tried "#include <random>". The error messages below are just the first few...
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(28): error: identifier "using" is undefined
using _CSTD acosf; using _CSTD asinf;
^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(28): error: declaration is incompatible with "float __cdecl acosf(float)" (declared at line 185 of "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\math.h")
using _CSTD acosf; using _CSTD asinf;
^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(28): error: identifier "using" is undefined
using _CSTD acosf; using _CSTD asinf;
^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(28): error: declaration is incompatible with "float __cdecl asinf(float)" (declared at line 186 of "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\math.h")
using _CSTD acosf; using _CSTD asinf;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(29): error: identifier "using" is undefined
using _CSTD atanf; using _CSTD atan2f; using _CSTD ceilf;
^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\cmath(29): error: declaration is incompatible with "float __cdecl atanf(float)" (declared at line 187 of "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\\..\..\VC\INCLUDE\math.h")
using _CSTD atanf; using _CSTD atan2f; using _CSTD ceilf;
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!