具体报错:
Class1_com.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\intrin.h(26) : fatal error C1083: Cannot open include file: ‘ammintrin.h’: No such file or directory
Error: An error occurred while shelling out to mbuild (error code = -1).
Unable to build executable.
这个问题是由windows的一个bug导致的,bug为系统缺少ammintrin.h头文件。
具体bug的来源参看下面两篇文章:
https://download.csdn.net/download/gym345600/9517419
https://ww2.mathworks.cn/matlabcentral/answers/288537-matlab-compiler-6-2-the-system-cannot-find-the-path-specified-error-an-error-occurred-while-shel?s_tid=srchtitle
解决办法一:在 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include 目录下添加ammintrin.h头文件
解决办法二:将 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include 文件夹下的 ammintrin.m 修改为 ammintrin.h
ammintrin.h头文件下载途径有很多,是一个常见bug,大家可以自行下载,百度文库就有