2 n+ r/ A z/ E/ H7 H* V4 u3 c+ K 0 A5 U. c1 f- H3 U* L |Solution * P/ i' k3 |# ?; S$ \根据Matlab的提示,安装:Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO),在下载页面,有三个ISO文件可以选择,如下表选择第三个,即amd64。 ( {) {1 S/ Z+ G0 ~, _; Q8 G3 T. m8 D, E! I3 m" w& s7 S/ O) A, x3 E' O
名称 版本 5 j5 S @% C3 u3 eGRMSDK_EN_DVD.iso x86 . o1 _! k" {% g ^) r& nGRMSDKIAI_EN_DVD.iso Itanium / f. o0 T* W" ]" k7 ^+ i: aGRMSDKX_EN_DVD.iso amd64 * }) L/ z8 J5 Y2 [# U0 ] + g9 {3 M0 @4 z" P0 |/ Q注意 4 E/ ]/ ?0 G4 V2 z如果安装Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO)时出现如下错误:% Z: z7 n$ G6 u" C% g2 H
5 t+ I' J ]0 @: T
A problem occurred while installing selected Windows SDK components. 9 o8 t, _, Q& G, Y9 Y " C2 h6 e! K% H4 e4 q7 Q2 jInstallation of the “Microsoft Windows SDK for Windows 7” product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information. " G6 Z4 k0 w0 e" h# o+ I! m+ o 6 _- s8 C* z- `2 n; C- w- @" P; yPlease attempt to resolve the problem and then start Windows SDK setup again. If you continue to have problems with this issue, please visit the SDK team support page at http://go.microsoft.com/fwlink/?LinkId=130245. 2 P+ c; ?" G( f3 T% f4 ~& K2 T- C: ^5 K$ n9 }1 X$ H& j
Click the View Log button to review the installation log. + ^) b# R; A. z/ Z/ C0 tTo exit, click Finish. ' @# b" z+ }; [1 B7 \ - D8 I: C9 B) [$ o3 U1 A8 M如下图: % f2 n; R: b, M; Y5 D l
2 i: R. d% c8 K+ o' }7 X* [8 M% |) C6 l; e* ]# O. E% |
解决办法: . r% q6 E ~$ s/ t* M' F出现此问题,很可能是你的PC机已经安装了:Microsoft Visual C++ 2010,而在安装Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO)时默认选择安装Microsoft Visual C++ 2010,如下图,造成的冲突,可以卸载已经安装的,注意32和64位的都要卸载。2 W d! q( s Z" B1 L
. h( T. b i& t# |/ X依然如上图tools目录结构示意所示,tools为当前目录,不同的是: 8 I$ |- J) |5 I: G7 I4 e8 e 7 B" d0 o( p/ ]1 k- c4 m- L
你删除了func.mexw32和func.mexw64文件,你的运行环境是Windows下的MATLAB,那么你调用成功的是func.m文件,而不是“mex”文件夹中的func.mexw32或func.mexw64,因为MATLAB第一匹配到“func”函数的是func.m; # v L3 z$ @0 ?; Q X