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

3 次查看(过去 30 天)
five
five 2014-7-28
当输入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

采纳的回答

Effie Ruan
Effie Ruan 2014-7-28
是的,在新版本中,我们简化了设置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 个评论
five
five 2014-7-28
混合编译
tinggui chen
tinggui chen 2017-7-11
老哥,你说的这种方法不行啊

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by