ä»ç»å¦ä¸ï¼
è¦å°ç¨Matlabè¯è¨ç¼åçå½æ°æ件ç¼è¯æå¯ç¬ç«æ§è¡ç*.exeæ件(å³å¯è±ç¦»Matalabç¯å¢çæ§è¡ç¨åº)ï¼é¦å
è¦å®è£
åé
置好Matlab Compilerï¼ä¸è¬æ¥è¯´ï¼å¨å®è£
Matlabæ¶å°±å·²ç»å®è£
äºç¸åºçæ¬çMatlab Compilerãåªæ¯ä¸åçæ¬çMatlabï¼å
¶ç¼è¯å¨ç使ç¨æ¹æ³æä¸å®çå·®å¼ï¼è¿ä¸ç¹è¦å¼èµ·ä¸å®ç注æã
å¨ç¡®å®å®è£
好Matlab Compileråï¼è¿éè¦å¯¹Compilerè¿è¡éå½çé
ç½®ï¼æ¹æ³æ¯å¨Matlabå½ä»¤çªå£è¾å
¥ï¼
Mbuild âsetup
ç¶åæ ¹æ®æ示æ§è¡ç¸åºçæä½ï¼ä½¿ç¨è
å¯æ ¹æ®èªå·±è®¡ç®æºä¸ç°æç¼è¯å¨çæ
åµéæ©åéçç¼è¯å¨ï¼å¦VC++ 6.0ãVC++7.0ãBland Cçç¼è¯å¨çï¼ç®åMatlab好象è¿ä¸æ¯æVC++8.0(æ计ç®æºå®è£
çå°±æ¯VC++2005ï¼Matlabå°±æ æ³è¯å«)ãå½ç¶ï¼å¦æä½ ç计ç®æºéæ ¹æ¬å°±æ²¡æå®è£
å
¶ä»ä»»ä½è¯è¨çç¼è¯å¨ï¼ä¹å¯éæ©Matlabèªå¸¦çLccç¼è¯å¨ï¼å
¶å®è¿ä¸ªç¼è¯å¨å¯¹å¤§å¤æ°ç¨æ·å·²ç»å¤ç¨äº(æå°±æ¯éæ©çMatlabèªå¸¦çLccç¼è¯å¨)ã
é
置好ç¼è¯å¨åï¼èªç¶å°±æ¯å¯¹èªå·±ç¼åçMæ件è¿è¡ç¼è¯äºã
å°Mæ件ç¼è¯ä¸ºç¬ç«å¯æ§è¡æ件çè¯æ³æ¯ï¼
>>mcc âm fun1.m fun2.mâ¦..
å
¶ä¸fun1å°±æ¯æåçå¯æ§è¡æ件çå称ã
å¦å¤ï¼ä¹å¯éè¿éç¨å½ä»¤å¼å
³-oæå®ç¼è¯æç»ç®æ æ件çå称ï¼å¦ mcc âm main.m âo mrank_mainï¼å°±æ¯å°ç¼è¯åçæ件æå®ä¸ºmrank_main.exeã
ç¼è¯åççææä»¶æ ¹æ®ç¼è¯å¨ççæ¬ä¸åèä¸åãå
·ä½çå¯åé
ç¸å
³èµæã
å¦æè¦å¨æ²¡æå®è£
matlabç计ç®æºä¸æ§è¡ç¼è¯åçç¨åºï¼é¦å
è¦å°\MATLAB701\toolbox\compiler\deploy\win32ä¸çMCRinstaller.exeå®è£
å°è¯¥è®¡ç®æºä¸(7.0以åççæ¬æ¯mglinstaller.exe)ã
å
¶æ¬¡æ¯è¦å°âMCRinstaller.exeå®è£
ç®å½\runtime\win32âè¿ä¸ªè·¯å¾æ·»å å°è¯¥è®¡ç®æºçç¯å¢åéä¸ï¼æ·»å çæ¹æ³æ¯ï¼
å³å»âæççµèââå±æ§ââé«çº§ââç¯å¢åéââæ·»å âæå®ä¸ä¸ªåéåï¼ç¶åå°ä¸è¿°è·¯å¾å¤å¶å°éé¢å°±å¯ä»¥äºã
第ä¸æ¥æ¯å°ç¼è¯çæçç¸ç¸å
³æ件æ·è´å°åä¸ç®å½ä¸(å½ç¶å
¶ä»ç®å½äº¦å¯)ã
第åæ¥æ¯æå¼MS-dosæä½çªå£ï¼è¿å
¥å°ç¼è¯åç*.exeç¨åºæå¨çç®å½ï¼æ§è¡ç¼è¯çæç*.exeæ件å³å¯ã
éè¦è¯´æçä¸ä¸ªé®é¢ï¼
å¦æä½ çç¨åºè¿é带æå¾ç(å¦Versionä¸çå¾æ )ãWeb页é¢(å¦helpææ¡£)ï¼å¨ç¼è¯çæ¶åå¯è½æ æ³ä¸Mæ件ä¸èµ·ç¼è¯(å 为æ没æè¯è¿ï¼ä¹æ²¡æçå°æå
³è¿æ¹é¢çä»ç»)ï¼è¿æ²¡æå
³ç³»ï¼å
å¨è®¡ç®æºä¸æ§è¡ä¸æ¬¡ä½ ç¼è¯åçæçç¬ç«å¯æ§è¡æ件ï¼è¿æ¶å¨åä¸ç®å½ä¸ä¼çæä¸ä¸ªä»¥ä½ ç¼è¯åçç¨åºå+_mcrç»å°¾çæ件夹ï¼è¿æ¶ï¼ä½ åªéè¦æä¸ç¨åºç¸å
³çå¾æ åWeb页é¢æ·è´å°è¯¥æ件夹ä¸çMatlabprogramä¸é¢çä¸ä¸ªåç®å½(ä¸è¬ä¸ç¨äºç¼è¯çæ件夹åç¸å)ä¸å³å¯ã
å
¶ä»çæ¹æ³è¿æï¼(以ä¸æ¯ç½ä¸æç´¢å°çæ¹æ³ï¼æ²¡æè¯éªè¿ï¼æå
´è¶£çæåå¯ä»¥è¯ä¸è¯)
æ¹æ³ä¸ï¼å¨matlabä¸çworkspaceéæcomtoolï¼ç¹file-open projectå°æ们å
å建好çcomtest.cblå·¥ç¨æ件æå¼ï¼åç¹component--package componentå°±å®ç°äºæå
ï¼æ¤æ¶å°comtest\distribæ件夹éçï¼çæçcomtest.exeå°±æ¯æå
åç解åç¨åºï¼åå»å®ä¼è§£ååºä¸äºæ件ï¼åç¹å»è§£ååºæ¥ç_install.batå°±å¯ä»¥å®ç°å®è£
æ¹æ³äºï¼å¦ä½å°guiçæexe ï¼
å·²ægui.mæ件ågui.figæ件
1 å¨matlabçcommandçªå£ä¸è¾å
¥
mcc -B sgl GUI.m
2.å°ä¸æ¥çæçæ件å
æ¬*.m æ件å*.figæ件ä¸èµ·èå°å¾
è¿è¡çæºå¨
æ¤æ¶ä»ématlabæå¿
éçå¨æè¿æ¥åºã
3. å° <matlab path >/extern/lib/win32/mglinstallar.exelæ·è´å°å°å¾
è¿è¡æºå¨ä¸
4.å¨æºå¨ä¸å
è¿è¡mglinstallar.exe, ç¶åéæ©è§£åç®å½ï¼å°å¨æå®ç®å½ä¸è§£å缩åºbinåtoolbox两åç®å½ï¼å
¶ä¸å¨bin\win32ç®å½ä¸å°±æ¯æ°å¦åºåå¾å½¢åºè±ç¦»MATLABè¿è¡æéçææå¨æè¿æ¥åºï¼å
±æ37个ãå¯ä»¥å°è¿äº.dllèå
¥system32, ä¹å¯ä»¥ç´æ¥æ¾å¨åºç¨ç¨åºç®å½ä¸ãètoolboxç®å½åå¿
é¡»ä¸åºç¨ç¨åºåä¸ç®å½ã
5.大ååæã
æ¹æ³ä¸ï¼è¿è¡mcc -B sgl GUI.m çæexeæ件ï¼æGUI.exeæ件åGUI.ctfæ件æ·è´å°ç®æ çµèä¸ï¼ç¶åå¨ç®æ çµèä¸å®è£
MCRInstaller.exe ,å®è£
å®ä»¥åï¼æç¹å»GUI.exe,å®æ¾ç¤ºï¼this application has requested the Runtime to terminate it in an unusual wayãè¿ä¸ªå¯è½æ¯åªéåºéäºå¢ï¼
Solution:
The segmentation violation can be caused due to a corruption in either the profile of the current user or by corrupted Windows libraries. In order to determine which is the cause, try logging in as a different username and run MATLAB.
If you are able to successfully launch MATLAB under a different username:
1. Log onto the machine, as the user that is receiving the error.
2. On your desktop, click on Start > Run
3. Type "regedit" in the Open text field and click OK, this will bring up the Registry Editor
4. In the Registry Editor expand the following folders: HKEY_CURRENT_USER > Software > MathWorks > Matlab
5. Under the MATLAB key, find the folder having the same name as the version number of the MATLAB that is crashing; and delete it. This Registry key will be regenerated the next time MATLAB is started.
Click on the link below to view an image of the Registry Editor, which shows how to delete a registry key for MATLAB 6.5 (R13).
After following these steps, you should be able to launch MATLAB successfully.
If MATLAB crashes regardless of the user who is logged in, the crash may be caused by corrupted system libraries. For Windows NT, 2000, or XP, some customers have found that reinstalling Windows Service Packs have resolved the issue
温馨提示:答案为网友推荐,仅供参考