I am having trouble creating a MEX file for compatibility between ZED SDK and MATLAB. I have been following along with the build procedure outlined in the documentation liked here How to Use Matlab with ZED | Stereolabs
CMake was unable to find the path to MATLAB so I created an environmental variable with the proper path. I thought this would fix the issue but after attempting to configure the file I was given the error displayed in the following in the attached image. I don’t know why it would ignore the environment variable. Any help would be greatly appreciated.
I tried defining it directly and it worked, cmake took the env var when defined directly. It generated fine and could be opened in Visual Stuido. However when built in Visual studios it threw multiple errors and only built 1 out of 2. I tried rebuilding it but to no success. The output from build is listed below.
I will try repeating the entire process from the beginning and if it works ill add an update. Thank you for all your help.
I’ve same problem. After solving part of CMake’s links Visual studio will not compile and return me this error:
C1083 Cannot opern include file: ‘mex.h’: No such file or directory mexZED mexZED.cpp 6.
I downloaded package directly from web without any modification.
It looks like your MATLAB_INCLUDE_DIR is wrong.
try to set it to ‘C:/Program Files/MATLAB/R2021b/extern/include’
This folder should contains the file ‘mex.h’, maybe in a new Matlab version (as yours) it has changed