I am also getting this error when trying to compile .mex file.
I am using Matab2020, although the .c src code I got for compilation was written using Matlab2014.
Error using mex
D:\Matlab\simics-pil\simicspil-src\pil_main-from-matlab-2014a.c:10:31: fatal error: xil_interface_lib.h: No such file or directory
#include "xil_interface_lib.h"
^
compilation terminated.