使用mex在MATLAB中找不到C ++编译器 [英] No C++ compiler found in MATLAB using mex

查看:290
本文介绍了使用mex在MATLAB中找不到C ++编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在matlab中编译一个mex文件。问题是它总是说我没有安装sdk或编译器。但我已经安装了visual studio 2012 ultimate,没有任何改变错误。我也安装了sdk。有什么我可以尝试的吗? matlab版本是R2012a,我使用的是Windows 7,64位。





示例代码:(清晰的人体姿势估计代码)

http://groups.inf.ed.ac.uk/calvin/articulated_human_pose_estimation_code/downloads/pose_estimation_code_release_v1.21.tgz [ ^ ]

I'm trying to compile a mex file within matlab. The problem is that it is always saying that I don't have sdk or compiler installed. But I have installed visual studio 2012 ultimate and nothing is changing the error. Also I have installed the sdk. Is there anything that I could try? The matlab version is R2012a and I'm using windows 7, 64 bits.


sample code : (articulated human pose estimation code)
http://groups.inf.ed.ac.uk/calvin/articulated_human_pose_estimation_code/downloads/pose_estimation_code_release_v1.21.tgz[^]

推荐答案

你需要安装一个编译你的mex文件的编译器。



mex为构建配置设置有效后缀,因为VS CANT编译此类文件。
you need to install a compiler which compiles your mex-file.

"mex" inst a valid suffix for your build configuration, because VS CANT compile such file.


>> %安装编译器



mex -setup



欢迎使用mex -setup。该实用程序将帮助您设置

默认编译器。有关支持的编译器列表,请参阅

http://www.mathworks.com/support/compilers/R2012a/win64.html



请选择用于构建MEX文件的编译器:



您是否希望mex找到已安装的编译器[y] / n? n $ /


选择编译器:

[1]英特尔C ++ 13.0(带有Microsoft软件开发工具包(SDK)链接器)

[2]英特尔C ++ 13.0(使用Microsoft Visual C ++ 2010链接器)

[3]英特尔C ++ 13.0(使用Microsoft Visual C ++ 2012链接器)

[4 ]英特尔C ++ 12.0(带有Microsoft软件开发工具包(SDK)链接器)

[5]英特尔C ++ 12.0(带有Microsoft Visual C ++ 2008 SP1链接器)

[6]英特尔C ++ 12.0(使用Microsoft Visual C ++ 2010链接器)

[7]英特尔C ++ 11.1(使用Microsoft Visual C ++ 2008 SP1链接器)

[8]英特尔Visual Fortran 13(带有Microsoft软件开发工具包(SDK)链接器)

[9]英特尔Visual Fortran 13.0(带有Microsoft Visual C ++ 2010链接器)

[10]英特尔Visual Fortran 13.0(带微软) Visual C ++ 2012链接器)

[11]英特尔Visual Fortran 12(带有Microsoft软件开发工具包(SDK)链接器)

[12]英特尔Visual Fortran 12.0(带Microsoft Visua) l C ++ 2008 SP1链接器)

[13]英特尔Visual Fortran 12.0(带有Microsoft Visual C ++ 2008 Shell链接器)

[14]英特尔Visual Fortran 12.0(带有Microsoft Visual C ++) 2010链接器)

[15]英特尔Visual Fortran 11.1(带有Microsoft Visual C ++ 2008 SP1链接器)

[16]英特尔Visual Fortran 11.1(带有Microsoft Visual C ++ 2008 Shell链接器) )

[17] Microsoft软件开发工具包(SDK)7.1

[18] Microsoft Visual C ++ 2005 SP1

[19] Microsoft Visual C ++ 2008 SP1

[20] Microsoft Visual C ++ 2010

[21] Microsoft Visual C ++ 2012



[0 ]没有



编译器:14
>> % Setup compiler

mex -setup

Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html

Please choose your compiler for building MEX-files:

Would you like mex to locate installed compilers [y]/n? n

Select a compiler:
[1] Intel C++ 13.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 13.0 (with Microsoft Visual C++ 2010 linker)
[3] Intel C++ 13.0 (with Microsoft Visual C++ 2012 linker)
[4] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[5] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[6] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[7] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[8] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker)
[9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker)
[10] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker)
[11] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[14] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[15] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[16] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[17] Microsoft Software Development Kit (SDK) 7.1
[18] Microsoft Visual C++ 2005 SP1
[19] Microsoft Visual C++ 2008 SP1
[20] Microsoft Visual C++ 2010
[21] Microsoft Visual C++ 2012

[0] None

Compiler: 14


这篇关于使用mex在MATLAB中找不到C ++编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆