转自 http://blog.sina.com.cn/s/blog_3ebc3c2901018v59.html
最近两天被MatLab搅得是鸡飞狗跳。先是在Mac下的2012a莫名其妙的启动之后,CPU占有率飙升超过100%,完全没法用,连用个logo命令都不得安生。无奈重装。同样问题。烦!暴走回Windows。今天安装完Windows的2011a版之后发现有这样一个配置说明:
1. The following products require a supportedcompiler:
MATLAB Compiler 4.15
MATLAB Builder NE 4.0
MATLAB Builder JA 2.2.2
MATLAB Builder EX 2.0
Stateflow 7.7
Simulink Coder 8.0
xPC Target 5.0
MATLAB Coder 2.02. Simulink requires a C compiler for simulation acceleration,model reference, and MATLAB Function Block capabilities. It isrecommended that you install a supported compiler on yourmachine.
3. To accelerate computations with the following products, asupported compiler is required:
SimBiology 3.4
Fixed-Point Toolbox 3.34. To configure Real-Time Windows Target you must type rtwintgt-setup in a MATLAB command window.
5. After this installation is complete, you should continue withyour configuration of the MATLAB Distributed Computing Server asoutlined in the instructions obtained from www.mathworks.com/distconfig.
6. You have installed xPC Target. Use the xPC Target ExplorerGUI (type xpcexplr in the MATLAB Command Window) to correctlyconfigure xPC Target with a valid compiler pathname. For furtherhelp, type doc xpcexplr.
7. Run mbuild -setup from MATLAB before using MATLAB Compiler orbuilder products.
乍一看还以为是编译器出了问题。赶紧上网搜了一搜。MathWorks的网页上有这样一份说明。原文链接如下:
http://www.mathworks.cn/support/compilers/R2012a/win32.html
Supported and Compatible Compilers – Release2012a
A number of MathWorks products or product features require thatyou have a third-party compiler installed on your system. Thetables below outline the compilers that are supported by variousMathWorks products. These compilers are provided by a number ofvendors and are available under a variety of commercial, academic,or open source terms; visit the providers' Web sites for furtherinformation.
Windows(32-bit)
On 32-bit Windows, the lcc C compiler is installed along withMATLAB, providing out-of-the-box support for most MathWorksproducts. Further options are available as outlined in thistable.
MATLAB Product Family – Release 2012a
MATLAB MATLAB Compiler MATLAB Builder EX MATLAB Builder NE MATLAB Builder JA MATLAB Coder SimBiology Fixed-Point Toolbox Compiler For MEX-filecompilation and external usage of MATLAB Engine and MAT-fileAPIs For C and C++shared libraries For allfeatures For allfeatures For allfeatures For allfeatures For acceleratedcomputation For acceleratedcomputation lcc-win32v2.4.1
Included with MATLAB√ √ √ √ √ Microsoft Windows SDK7.1
Available at no charge;requires .NET Framework4.0√ √ √ √ 4 √ √ √ Microsoft Visual C++ 2010Professional √ √ √ √ 4 √ √ √ Microsoft Visual C++2008 Professional SP1 √ √ √ √ 4 √ √ √ Intel C++Composer XE 2011 3 √ Open Watcom C/C++v1.8 2
Available at no charge√ √ √ √ Intel VisualFortran Composer XE 2011 3 √ Microsoft .NET FrameworkSDK 2.0, 3.0, 3.5
Available at no charge√ 4, 5 Java Development Kit(JDK) 1.6
Available at no charge√ Simulink Product Family – Release 2012a
Simulink Simulink Simulink Stateflow Simulink Coder Embedded Coder xPC Target Simulink CodeInspector Compiler For S-Functioncompilation For modelreferencing, Accelerator mode, and MATLAB Functionblocks For RapidAccelerator mode For allfeatures For all features When targetingthe host OS For allfeatures For allfeatures Lcc-win32v2.4.1
Included with MATLAB√ √ √ √ √ √ √ Microsoft Windows SDK7.1
Available at no charge;requires .NET Framework4.0√ √ √ √ √ 8 √ 8 √ √ Microsoft Visual C++ 2010Professional √ √ √ √ √ √ √ √ Microsoft Visual C++2008 Professional SP1 √ √ √ √ √ √ √ √ Intel C++Composer XE 2011 3 √ √ Open Watcom v1.82
Available at no charge√ √ √ √ √ √ Intel VisualFortran Composer XE 2011 3 √ 6 √ 7 Notes for the Windows (32-bit) Platform
- Support for this version of thiscompiler will be discontinued in a future release, at which time anew version will be supported. Consult the platform road map for more information.
- Support for C++ exception handling islimited. You can find more information in Solution 1-4OKNSV.
- Intel compilers depend on tools provided by Microsoft. Thefollowing combinations are supported:
Microsoft
Visual Studio 2010
Professional (32-bit)Microsoft
Windows SDK 7.1Microsoft
Visual Studio 2008 SP1
Professional Edition (32-bit)Microsoft
Visual Studio 2008
Shell
(32-bit)Intel Visual C++ Composer XE 2011 √ √ √ Intel Visual Fortran Composer XE 2011 √ √ √ √ - To build .NET components, a Microsoft.NET Framework must be installed. The .NET Framework v3.0 does notcontain a framework-specific compiler; compatible components can bebuilt using the v2.0 compiler. The .NET Framework is automaticallyinstalled by Visual Studio. It can also be downloaded from theMicrosoft Web site. To execute applications that use the resulting.NET components, the target machine must have the matching .NETFramework installed.
- MATLAB Builder NE supports building.NET assemblies but not COM objects when using the Microsoft .NETFramework SDK without Microsoft Visual Studio.
- Fortran compilers are supported withSimulink only for creating Simulink S-Functions using the MATLABMEX command. The S-Functions can be used with normal andaccelerated simulations.
- xPC Target supports Fortran code inSimulink models using C-MEX wrapper S-Functions.
- .sln project generation is notsupported when using the Microsoft Windows SDK.
MathWorks的意思其实就是说,如果你的Windows电脑装了Visual C++2008或者Visual C++ 2010,再加上Java DevelopmentKit(JDK)1.6的话,那编译MatLab上的任何文件都没有问题了。
同样的情况也有Mac系统的说明,就是说Xcode +JDK可以解决一切MatLab所需要的编译活儿了。
所以就算出现了前面的说明也不用紧张,没有VC++、JDK下载一个就是了。
联系客服