使用 Visual Studio 2013 的 C 编译器进行 MATLAB
Using Visual Studio 2013's C compiler for MATLAB
我使用mex -setup
命令添加了Visual Studio 2013作为MATLAB的默认C编译器。我使用在互联网上找到的下载文件添加了Visual Studio 2013,并附有以下说明。
The files
* msvc120engmatopts.bat
* msvc120opts.bat
* msvc120opts.stp
should be copied to C:Program FilesMATLABR2013abinwin64mexopts .
The files
* msvc120compp.bat
* msvc120compp.stp
should be copied to C:Program FilesMATLABR2013abinwin64mbuildopts .
我的MATLAB版本是R2011b,所以我适当地替换了路径。
下面是我用它来运行一个C函数来验证编译器是否被链接。
日志文件我从这个答案中发现了这个方法。
但是,当我在Simulink模型中使用MATLAB函数时,我得到以下错误消息,就像我将VS2013编译器链接到MATLAB之前一样。
Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
Use 'mex -setup' to select a supported C-compiler.
好吧,所以唯一适用于我的MATLAB"R2011b"版本的是Microsoft SDK 7.1,因为其他编译器对于Windows 7 64位来说太旧了。不支持MinGW-64位。虽然它在MATLAB上工作,但它不被Stateflow识别。
所以我从下载了。iso文件在这里
如果您在安装SDK时遇到任何困难,请尝试this
相关文章:
- C/C++编译器通常会删除重复的库吗
- 在C++STL中是否有Polyval(Matlab函数)等价物?
- 模板-模板参数推导:三个不同的编译器三种不同的行为
- Win32编译器选项和内存分配
- Matlab 无法检测到 Visual Studio C++编译器
- 在 Ubuntu OS 中的 Matlab 2017a 上切换编译器
- MATLAB在MEX_COLPILE LINUX中找到没有支持的编译器或SDK
- MATLAB S函数构建器如何将编译器更改为G
- 链接到MATLAB编译器SDK生成的C 共享库
- 将 Fedora 23 上的 C/C++ 编译器降级为 MATLAB R2016a 兼容编译器
- 为matlab R2011b建立c++编译器
- 使用 C++ 编译器设置 MATLAB
- 如何使用Visual c ++编译器在MATLAB中编译vlfeat和mexopencv库
- 我怎样才能让 MatLab 找到 Visual C++ 编译器
- MATLAB如何更改默认编译器
- 如何为matlab设置C/C++编译器
- matlab编译器:更新数据到图形窗口
- 使用 Visual Studio 2013 的 C 编译器进行 MATLAB
- 如何通过Matlab-Mex编译工具使用C++编译器
- 如何通过 OSX 更改 Matlab 中的C++编译器