While manually/automatically installing mex cpp copmpiler, an error stating "Cannot open include file: 'ammintrin.h': No such file or directory" might pop up.
Then the ammintrin.h file could be downloaded from the website given below and it should be further placed in the directory stated in the error.
https://in.mathworks.com/matlabcentral/answers/90383-fix-problem-when-mex-cpp-file