简体   繁体   English

严重错误C1083:无法打开包含文件:'mexutils.h':没有此类文件或目录

[英]fatal error C1083 : Cannot open include file: 'mexutils.h': No such file or directory

I would like to compile a c++ file as a mex file in MATLAB namely: "mexLasso.cpp". 我想在MATLAB中将c ++文件编译为mex文件,即:“ mexLasso.cpp”。

These are the steps I take and I get the following error. 这些是我采取的步骤,但出现以下错误。 What is the problem? 问题是什么?

1. Put the files "mexLasso.cpp" and "mexutils.h" in a folder. 1.将文件“ mexLasso.cpp”和“ mexutils.h”放在一个文件夹中。

2. Set the compiler: 2.设置编译器:

 mex -setup C++ 

I recieve: 我收到:

MEX configured to use 'Microsoft Visual C++ 2013 Professional' for C++ language compilation.

3. Run the command: 3.运行命令:

mex C:\...\mexLasso.cpp

I recieve the following error: 我收到以下错误:

Error using mex
mexLasso.cpp
C:\...\mexLasso.cpp(33) : fatal error C1083: Cannot
open include file: 'mexutils.h': No such file or directory

Can somebody help us what we are missing? 有人可以帮助我们我们所缺少的吗?

From the mex command line tool reference , there is an argument for adding include paths: mex命令行工具参考中 ,有一个用于添加包含路径的参数:

-Ipathname Adds pathname to the list of folders to search for #include files. -Ipathname将路径名添加到要搜索#include文件的文件夹列表中。
Do not add a space between I and pathname. 不要在I和路径名之间添加空格。

Like this: 像这样:

mex -v -IC:\path\to\mexutils_h\ mexLasso.cpp

Note that with -I you are not specifying the header, you are specifying a path containing one or more header files. 请注意,使用-I您未指定标头,而是指定了包含一个或多个标头文件的路径。

Thanks for your comments. 感谢您的意见。 I think the besy way to solve my problem is to install SPAMS in my machine and successfully compile it. 我认为解决问题的好方法是在我的计算机上安装SPAMS并成功编译它。 I have posted the steps I take in this post : 我已经发布了我在这篇文章中采取的步骤:

How to install SPAMS toolbox in Matlab 2014b under windows 8.1 如何在Windows 8.1下的Matlab 2014b中安装SPAMS工具箱

Can I have your opinion there. 我可以在那儿发表您的意见吗? Sorry for duplicated message, only for relevancy and importance of the discussed topic. 对不起,重复消息,仅是所讨论主题的相关性和重要性。

Many thanks. 非常感谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 严重错误C1083:无法打开包含文件:'vld.h':没有此类文件或目录 - fatal error C1083: Cannot open include file: 'vld.h': No such file or directory 致命错误 C1083:无法打开包含文件:“xyz.h”:没有这样的文件或目录? - fatal error C1083: Cannot open include file: 'xyz.h': No such file or directory? 严重错误C1083:无法打开包含文件:“ Item.h”':没有此类文件或目录 - fatal error C1083: Cannot open include file: 'Item.h”': No such file or directory 致命错误 C1083:无法打开包含文件:'fstream.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory xxx.h:致命错误C1083:无法打开包含文件:'yyyy.h':没有此类文件或目录 - xxx.h: fatal error C1083: Cannot open include file: 'yyyy.h': No such file or directory Visual Studio 2013:致命错误C1083:无法打开包含文件:'winsock2.h':没有此类文件或目录 - Visual Studio 2013: fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory Microsoft Visual Studio Community 2019:致命错误 C1083:无法打开包含文件:'corecrt.h':没有这样的文件或目录 - Microsoft Visual Studio Community 2019: fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory SWIG致命错误C1083:无法打开包含文件 - SWIG Fatal error C1083: Cannot open include file QtCreator中的“致命错误C1083:无法打开包含文件” - “Fatal Error C1083: Cannot open include file” in QtCreator 严重错误C1083:在发布模式下无法打开包含文件:“ mysql_connection.h” - fatal error C1083: Cannot open include file: 'mysql_connection.h' in release mode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM