求助:MATLAB R_2014a与VS2013混合编程的问题

7 views (last 30 days)
five
five on 28 Jul 2014
Commented: tinggui chen on 11 Jul 2017
当输入mex -setup时出现这样,和以前版本教程不一样,看不太懂,请大神详细讲一下中文版里混合编译的问题,最好有详细教程。多谢!
>> mex -setup MEX 配置为使用 'Microsoft Visual C++ 2013 Professional (C)' 以进行 C 语言编译。 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/ma ... se-64-bit-api.html.
要选择不同的语言,请从以下选项中选择一种命令: mex -setup C++ mex -setup FORTRAN

Accepted Answer

Effie Ruan
Effie Ruan on 28 Jul 2014
是的,在新版本中,我们简化了设置C编译器的步骤。在运行"mex -setup"后,会自动查找已有的编译器。比如你的电脑上有Microsoft Visual C++ 2013 Professional。如果你确认用这个编译器,就不需要再做其他操作了。
如果你的电脑上有其他的C编译器,在“mex -setup”后会有进一步的提示,告诉你如何选择非默认编译器,类似:
To choose a different C compiler, select one from the following: Microsoft Visual C++ 2012 (C)
mex -setup:C:\Users\Username\AppData\Roaming\MathWorks\MATLAB\R2014a\mex_C_win64.xml C
你只需复制显示的命令,然后再运行,就可以设置其他编译器。
  3 Comments
five
five on 28 Jul 2014
混合编译
tinggui chen
tinggui chen on 11 Jul 2017
老哥,你说的这种方法不行啊

Sign in to comment.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!