【问题标题】:How to locate compiler for mex in matlab 2016a?如何在 matlab 2016a 中找到 mex 的编译器?
【发布时间】:2017-03-02 21:05:29
【问题描述】:

使用 Matlab 2013b,我运行命令 mex -setup 并得到结果:

>> 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/R2013b/win64.html 

Please choose your compiler for building MEX-files: 

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

我的问题是,在 Matlab2016a 下我看不到这条消息 - 我只得到以下结果:

>> mex -setup
MEX configured to use 'Microsoft Visual C++ 2012 (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.

To choose a different language, select one from the following:
 mex -setup C++ 
 mex -setup FORTRAN

请问,我怎么能看到这条消息

"Welcome to mex -setup. This utility will help you set up etc"

非常感谢。

【问题讨论】:

  • 因为已经配置好了。第二条消息告诉你“嘿,这里没什么可做的,它已经为'Microsoft Visual C++ 2012 (C)' 配置了”
  • 感谢您的帮助。我想更改编译器,即我想使用intel c++compiler。我怎么能这样做?
  • According to the documentation,如果有a supported compiler,输入mex -setup C++就会出现

标签: matlab mex


【解决方案1】:

来自MATLAB documentation

要更改默认 C++ 编译器,请键入:

mex -setup cpp

这样你就可以换成不同的编译器如果你有的话。调用mex -setup 设置C编译器,可能不同。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-23
    • 2014-05-29
    • 2015-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多