필터 지우기
필터 지우기

.m to .exe

조회 수: 1 (최근 30일)
muhammad usama
muhammad usama 2011년 6월 2일
I am willing to convert *.M file (basically a GUI) in *.EXE file. I am using matlab R2009a, I didn't get any complier in mbuild. I did some work on it, now i have VS2008 and MCR installed in my system. Before proceeding I just came here to as you how to do so? Is there any role of VS2008 o just MCR can do it?
P.S: I am using win7 Home Premium 64 bit.

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 2일
The supported compilers are shown here. Please especially note footnote 6, which leads you to this important solution for 64 bit use.
MCR is not a compiler: it is part of the run-time for the executable.

추가 답변 (4개)

Image Analyst
Image Analyst 2011년 6월 3일
You can choose the VS2008 compiler. You just pick it when you do "mbuild -setup"
You need to run mbuild -setup whenever you install a new version of MATLAB or install additional compilers, such as VS2008.
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 6월 3일
Notice he is using Windows 64: for that you have to go through a two-step installation process in order to get the 64 bit compilers. The description of the process is linked to in my answer.

댓글을 달려면 로그인하십시오.


muhammad usama
muhammad usama 2011년 6월 3일
Thank you for replying I am following your instructions. I'll come back to you if it will be rquired.

muhammad usama
muhammad usama 2011년 6월 7일
i followed those steps, and now i am getting VS08 in mex, what else to do now? I am posting the result of mex -setup which i got. please have a look.
>> mex -setup Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler: [1] Microsoft Visual C++ 2008 Express in C:\Program Files (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
************************************************************************* Warning: MEX-files generated using Microsoft Visual C++ 2008 require that Microsoft Visual Studio 2008 run-time libraries be available on the computer they are run on. If you plan to redistribute your MEX-files to other MATLAB users, be sure that they have the run-time libraries. *************************************************************************
Trying to update options file: C:\Users\USAMA\AppData\Roaming\MathWorks\MATLAB\R2009a\mexopts.bat From template: C:\PROGRA~1\MATLAB\R2009a\bin\win64\mexopts\msvc90freeopts.bat
Done . . .
************************************************************************ 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/support/solutions/data/1-5C27B9.html?solution=1-5C27B9 Building with the -largeArrayDims option enables the new API.
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 6월 7일
Okay, those are warnings not errors. You can now proceed to build your mex. Note that you might have problems if the code was written expecting 32 bit windows.

댓글을 달려면 로그인하십시오.


muhammad usama
muhammad usama 2011년 6월 7일
after this I did: mcc -m filename.m and it crearted *.exe file in the default directory.
Thanks alot for you help and guidance.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by