2017-03-02 73 views
2

利用Matlab 2013b,我跑的命令mex -setup和我得到的結果是:如何在matlab 2016a中定位mex的編譯器?

>> 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"

非常感謝你。

+0

因爲它已經配置好了。第二條消息是告訴你「嘿,這裏沒有別的事情了,它已經配置好了」Microsoft Visual C++ 2012(C)「」 –

+0

謝謝你的幫助。我想更改編譯器,即我想使用intel C++編譯器。我怎麼能這樣做? –

+0

[根據文檔](https://uk.mathworks.com/help/matlab/matlab_external/changing-default-compiler.html),如果有[支持的編譯器](https://uk.mathworks。 com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2013b_SupportedCompilers.pdf),當你輸入'mex -setup C++' –

回答

1

MATLAB documentation

要更改默認的C++編譯器,鍵入:

mex -setup cpp 

這樣,如果你有他們你可以改變不同的編譯器。調用mex -setup會設置C編譯器,它可能不同。