Home > Blockchain >  rt_matrx.c(29): fatal error C1083: Unable to open include file: 'stdlib.h' : No such file
rt_matrx.c(29): fatal error C1083: Unable to open include file: 'stdlib.h' : No such file

Time:09-29

I have an issue during the compilation of a Simulink model, the model worked since I had a change in my Windows professional account, now I can't compile it anymore, and the following error is appearing in the debug window of Simulink:

rt_matrx.c(29): fatal error C1083: Unable to open include file: 'stdlib.h' : No such file or directory

I saw a similar issue on the Mathworks forum, which was resolved by reinstalling MATLAB, I tried to do the same and it didn't work for me.

I checked if the environment variables on my new windows account are the same from the previous one, they didn't change.

I don't have admin rights so I asked to my IT service if I was able to access all the paths I use with MATLAB, and apparently it's not the problem here.

My theory is that there is maybe an issue with how MATLAB and Visual Studio are linked together, that or maybe it comes from how the path is defined.

I'm a little lost for this issue, I would be glad if someone could help me or at least guide me on the origin of my problem, thanks you in advance.

MATLAB version: 2020A
Compiler version: Visual Studio 2019

CodePudding user response:

Hello everyone, for the people in need i found the solution of my problem, it came from two points :

The environment of Visual studio 2019 :

I use Visual Studio 2019 community to compile my projects on MATLAB and SIMULINK, and if you have MSVC and the SDK kits installed at the same time i can create conflicts within your compilation (You can find this specifics add-ons on Visual studio installer > Visual studio 2019 Community > modify > C Desktop development). Be sure when you install VS2019 to only get the strict minimum of add-ons you need to do your project.

My access rights to the MATLAB and Visual studio folders :

Check if you have a total control of your project (Right click on the folder concerned > Properties > Security, choose your user profile and check your rights).

For my part it worked when i changed my access rights of C:\Program Files\MATLAB\R2020a (be sure you have time for that because it took one hour for me, maybe you can only change the right to "toolbox" and it could works but i'm not sure about that) and C:\ProgramData\Speedgoat\speedgoatlib\R2020a

If the last solution doesnt work check the access rights of the other folders that are concerned by Matlab and visual studio.

  • Related