¡¡¡¡×î½ü×öµÄÏîÄ¿Óõ½ºÜ¶àÊý×ÖÐźŴ¦ÀíµÄ֪ʶ¡£ÒòΪ¶ÔÕⲿ·Ö²¢²»ÌرðÊìϤ£¬±à³ÌÓкܴóÏÞÖÆ£¬¶øMATLABÌṩÁ˷ḻµÄÊý×ÖÐźŴ¦Àí¹¤¾ßÏ䣬ÓÚÊÇMATLAB¾Í³ÉÁ˺ܺõÄÑ¡Ôñ¡£
¡¡¡¡ÔÚ³¢ÊÔ½«MATLAB³ÌÐòÕûºÏµ½C++ÖÐʱ£¬Óöµ½²»ÉÙÎÊÌâ£¬ÌØ¿ª´ËÌâ¡£
¡¡¡¡MATLABÔÚ7.0ÒÔºóʹÓÃMCR(Matlab Compiler Runtime)ÒÔ¼°CTF(Component Technology File)¼¼Êõ¡£ÒÔǰµÄ±àÒëÆ÷²àÖØ½«MATLAB³ÌÐò±àÒë³ÉC/C++³ÌÐò(ÏñMATCOM4.5ÄÇÑù)£¬µ«ºóÀ´²àÖØ±àÒëΪMCR¿ÉÖ´ÐгÌÐò¡£
¡¡¡¡ÕâÀï²åһС¶Î£ºMatlabµÄ´úÂë±àдºÜ¼òµ¥£¬ÔªËØÒ²±ÈC++Éٵö࣬ËùÒÔ´ÓÔÀíÉÏ˵°ÑMATLAB´úÂë·Òë³ÉC++ÊÇÍêÈ«¿ÉÐеģ¬MATCOM¾ÍÊDzÉÓÃÕâÒ»²ßÂÔ£¬¶øÇÒ»¹×Ô¼ºÌṩÁËÒ»Ì×MATCOM¾ØÕóÔËËãÊýѧ¿â£¬ÔÚC++ÖпÉÒÔÏñÓÃmath.cÖеÄËã·¨Ò»ÑùÓÃMATCOMµÄËã·¨¡£È»ºó¿ÉÒÔÓö¼û£¬ÕâÑù·¢Õ¹ÏÂÈ¥µÄÒ»´óÎÊÌâ¾ÍÊÇMATLABºËÐÄ´úÂë¶¼»á¹«Ö®ÓÚÖÚ£¬ÓÚÊÇMATLABÊÕ¹ºÁËMATCOM£¬²¢Í¨¹ýMCR¼¼Êõ½â¾öÁËÕâÒ»ÎÊÌâ¡£×¢ÒâÏÖÔÚ±àÒëºóÖ»ÊÇÌṩ½Ó¿ÚÎļþ£¬¶ø·ÇºËÐÄËã·¨µÄC++´úÂë¡£²»¹ýÈÔÓкܶ๤¾ßÏäÊDz»ÄÜͨ¹ýMatlab±àÒëµÄ¡£
¡¡¡¡MCRʵ¼ÊÊÇMatlabÌṩµÄ¶¯Ì¬Á´½Ó¿â£¬¿ÉÒÔÔÚδ°²×°MatlabµÄ»úÆ÷ÉÏÔËÐÐMaltabµÄ³ÌÐò¡£CTFÊǽ«×îÖÕÒª·¢²¼µÄ³ÌÐò´ò°üΪcftÎļþ(´ËÎļþ½øÐÐÁË´úÂë¼ÓÃÜ)¡£Í¨¹ý±àÒëµÄ¿ÉÖ´ÐгÌÐò»ò¶«À´Á´½Ó¿âÎļþ»òCOM×é¼þ£¬ÔÚÖ´ÐÐ(»ò±»Ö÷³ÌÐòµ÷ÓÃ)ʱ»á×Ô¶¯°Ñ±àÒëµÄMATLAB´úÂë´«µÝ¸øMCRÖ´ÐС£
¡¡¡¡Ê¹ÓÃMATLAB±àÒëÆ÷£º
¡¡¡¡ÔÚMATLABÔËÐÐmbuild -setupÃüÁ³öÏÖÈçÏÂÐÅÏ¢£º
¡¡¡¡>> mbuild -setup
¡¡¡¡Please choose your compiler for building standalone MATLAB applications:
¡¡¡¡Would you like mbuild to locate installed compilers [y]/n y
¡¡¡¡Select a compiler:
¡¡¡¡ Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010b\sys\lcc
¡¡¡¡ Microsoft Visual C++ 2010 in C:\Program Files\Microsoft Visual Studio 10.0
¡¡¡¡ Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
¡¡¡¡[0] None
¡¡¡¡Compiler: 2
¡¡¡¡Please verify your choices:
¡¡¡¡Compiler: Microsoft Visual C++ 2010
¡¡¡¡Location: C:\Program Files\Microsoft Visual Studio 10.0
¡¡¡¡Are these correct [y]/n y
¡¡¡¡****************************************************************************
¡¡¡¡Warning: Applications/components generated using Microsoft Visual C++
¡¡¡¡2010 require that the Microsoft Visual Studio 2010 run-time
¡¡¡¡libraries be available on the computer used for deployment.
¡¡¡¡To redistribute your applications/components, be sure that the
¡¡¡¡deployment machine has these run-time libraries.
¡¡¡¡****************************************************************************
¡¡¡¡Trying to update options file: C:\Users\IDM\AppData\Roaming\MathWorks\MATLAB\R2010b\compopts.bat
¡¡¡¡From template: C:\PROGRA~1\MATLAB\R2010b\bin\win32\mbuildopts\msvc100compp.bat
¡¡¡¡Done . . .
¡¡¡¡>> mbuild -setup
¡¡¡¡Please choose your compiler for building standalone MATLAB applications:
¡¡¡¡Would you like mbuild to locate installed compilers [y]/n y
¡¡¡¡Select a compiler:
¡¡¡¡ Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010b\sys\lcc
¡¡¡¡ Microsoft Visual C++ 2010 in C:\Program Files\Microsoft Visual Studio 10.0
¡¡¡¡ Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
¡¡¡¡[0] None
¡¡¡¡Compiler: 2
¡¡¡¡Please verify your choices:
¡¡¡¡Compiler: Microsoft Visual C++ 2010
¡¡¡¡Location: C:\Program Files\Microsoft Visual Studio 10.0
¡¡¡¡Are these correct [y]/n y
¡¡¡¡****************************************************************************
¡¡¡¡Warning: Applications/components generated using Microsoft Visual C++
¡¡¡¡2010 require that the Microsoft Visual Studio 2010 run-time
¡¡¡¡libraries be available on the computer used for deployment.
¡¡¡¡To redistribute your applications/components, be sure that the
¡¡¡¡deployment machine has these run-time libraries.
¡¡¡¡****************************************************************************
¡¡¡¡Trying to update options file: C:\Users\IDM\AppData\Roaming\MathWorks\MATLAB\R2010b\compopts.bat
¡¡¡¡From template: C:\PROGRA~1\MATLAB\R2010b\bin\win32\mbuildopts\msvc100compp.bat
¡¡¡¡Done . . .