error C1083: Cannot open include file: 'mex.h': No such file or directory

6 views (last 30 days)
Hi,
I am trying to complete this set of instructions https://github.com/BVLC/caffe/tree/windows#build When I build on visual studio, it says error C1083: Cannot open include file: 'mex.h': No such file or directory.
But I have mex already set up. Because when I type mex -setup in matlab it says
MEX configured to use 'Microsoft Windows SDK 7.1 (C++)' for C++ language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. >>
Someone help me pleaseeeeeeeeeeeeeeee :((((((

Answers (1)

Adam
Adam on 10 Jun 2016
Edited: Adam on 10 Jun 2016
You have to setup your include directories in Visual Studio in order for it to know where to find header files to include. This will need to point to wherever you have mex.h and the other required includes on your machine.

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!