When I write the .cpp file and want to generate the .mexw64 library file, I use the mex function to compile, and an error C3861: "mxGetDoubles": identifier not found, "mxGetUint8s": identifier not found, but I can use the "mxGetPr" function to compile .cpp files for normal mex. I am using MATLAB2020b version. According to the help document, the official recommendation is to use mxGetDoubles or mxGetUint8s function instead of mxGetPr function. When I use the mxGetUint8s function to get the output *plhs data pointer, the compiler reported the above error, and I found the definition of mxGetUint8s in "matrix.h", and it has been included correctly. Why can't I find the identifier?
temp = (mxUint8*)mxGetUint8s(plhs); // error C3861: "mxGetUint8s": Cannot find the identifier. or "mxGetDoubles" ,use "mxGetPr" instead is OK!
temp2 = (mxUint8*)mxGetUint8s(plhs);
My computer configuration environment:
ide: visual studio 2015 professional
matlab: matlab2020b, or matlab2020a
However, compiling and running the code in vs2015 is ok.