Currently I am building a model for Simulink Real-Time and have Microsoft Visual C++ Compilers Community 2015 as my compiler for Simulink Real-Time. When I try to build my model it gives the following error:
### Linking ...
link.exe /nologo /dll /MANIFEST /OPT:NOREF /export:mexFunction /OUT:Test_Handler_sfun.mexw64 /map:"Test_Handler_sfun.map" @Test_Handler_sfun.mol
LINK : fatal error LNK1104: cannot open file 'ucrt.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Bin\amd64\link.exe"' : return code '0x450'
Stop.
Previously I also had this error, which is caused by the same problem I believe. I solved this in an very unelegant manner.
C1083: Cannot open include file: 'stddef.h': No such file or directory
I have searched quite a bit on google. I found out that this is because of some files and/or libraries are now located in the Windows 10 SDK installation folder (C:\Program Files (x86)\Windows Kits\10) and that this path is not included in the compiler somehow. There are quite some solutions for when you are working in a Visual Studio project, but not when working with Matlab and or Simulink.
How do I make sure that the libraries and files can be found and opened by the compiler?