Error 1 error C1083: Cannot open include file: 'mex.h': No such file or directory
古いコメントを表示
I've just installed Matlab 2014 and Microsoft Visual Studio Professional 2013. I've already set mex compiler up in my matlab, and tested it with a simple mex-file (arrayProduct.c). But, when I wnat to debug a project in Visual Studio, I get the following Error:
Error 1 error C1083: Cannot open include file: 'mex.h': No such file or directory
Can anybody help me to get rid of this error. pleaseeeee :(
Thanks.
5 件のコメント
José-Luis
2014 年 7 月 10 日
What does your compilation line look like?
margol
2014 年 7 月 10 日
José-Luis
2014 年 7 月 10 日
You need to tell Visual Studio where mex.h is located, and it appears you are not doing that.
Your compilation line (that should show up in Visual studio whenever you build your project) should contain something like:
-I/path/to/Matlab/extern/include
margol
2014 年 7 月 10 日
Sruthi Ayloo
2014 年 7 月 10 日
Refer to this doc page for steps to debug a mex file with Microsoft Visual Studio.
回答 (1 件)
Johannes Kalliauer
2019 年 9 月 6 日
編集済み: Johannes Kalliauer
2019 年 9 月 6 日
Following worked for me:
gcc -c -I /opt/MATLAB/R2018b/extern/include myMEXfile.c
if I run mex I get: This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018)
If I run `which mex` i get /usr/local/texlive/2018/bin/x86_64-linux/mex
カテゴリ
ヘルプ センター および File Exchange で MATLAB Support for MinGW-w64 C/C++ Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!