I packaged the 7.13 MCR compiler with my files (via desploytool).
I have some questions with assuming the client installed the MCR.
1) If the client doesn't have MATLAB, but just the MCR. he will be able to run my application by the MCR?
2) how can the client make the MCR compiler to be the default?
I tried:
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:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010a\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
[0] None
Compiler:
but I didn't see the MCR. his location is something like: C:\Program Files\MATLAB\MATLAB Compiler Runtime\v713 but I don't know what is the exactly path. should I know it?
3) should I have to make a bat file which configures the MCR to be the default compiler?
The MCR is not a compiler.
MCR is an abbreviation for MATLAB Compiler Runtime. When you use deploytool or mcc (available with MATLAB Compiler or the MATLAB Builder products), it converts your MATLAB program into a standalone component (e.g. an executable or library). You then give your end user the component and the MCR, and the component runs against the MCR instead of MATLAB.
The answer to your question i) is yes, your users only need the MCR, not MATLAB. Your users should not need to interact with mbuild at all, (and if they don't have MATLAB anyway, they can't). mbuild is used by you when preparing to create the component, not by your users when running it.
I think you confuse things. MCR is MATLAB Compiler Runtime. It does not provide any compiler, it allows one to run MATLAB programs compiled and deployed with mcc.
So the answer to your first question: yes, your client needs only to install MCR to run the programs you compile for him using mcc.
The answer to the other questions: there is no compiler..
Related
I'm know that its a beginner question but after I'm install the Matlab Compiler Runtime how can i run the matlab compiler from DOS?
I have the directory C:\Program Files\MATLAB\MATLAB Compiler Runtime
Where is the compiler .exe or something like that?
Thanks
Make sure that you actually have the MATLAB compiler as well. The Compiler Runtime and the compiler are two entirely different programs.
From the help, The MATLAB Runtime is a standalone set of shared libraries that enables the execution of compiled MATLAB applications or components on computers that do not have MATLAB installed.
Once you've compiled the exe (on a computer with MATLAB), you will move the exe to a computer without MATLAB, which has the compiler runtime installed.
I'm encountering a serious problem while trying to deploy a Matlab program as a stand-alone for Windows.
My end users are employees in some corporation and have only access to static computers. While they can download, unpack and execute stuff, they don't have installation privileges, so they're unable to install the Matlab Compiler Runtime (MCR). Unfortunately, they need MCR in order to run my deployed/compiled Matlab program. The deploytool offers me the option to "include MCR in the package", but it doesn't really do that. Instead, it packages the MCR installer, which is useless in my case as described above.
So how can I create a stand-alone application that runs on Windows out of the box, even without MCR installed and without installing it first? There has to be a way to compile this all the way down to binary...
You can't run Matlab code standalone without having MATLAB or the MATLAB Compiler Runtime installed. But it is legal to distribute the MCR to the customers to make them able to use your programs.
Alternatively you can use the MATLAB Coder to convert your code to C/C++, which is not completely issue-free, as just a subset of the Matlab language is supported.
Have a look at this question for the differences between MATLAB Coder and MATLAB Compiler.
Just ask IT to install the MCR, that only needs to happen once. After that the users should be able to execute your programs.
Note: There is a reason that the MCR needs to be installed, and can't just be executed. Therefore I don't expect there to be a 'trick' to avoid this.
i installed two compilers in Matlab : LCC and Visual C++ 2008
i want to load a C++ header file in matlab but when i want to do this matlab uses LCC instead of
Visual C++ and gives me some warnings .
i used:
mex -setup
mbuild -setup
but Matlab still uses LCC for loading my C++ header file
>> loadlibrary('DLLing.dll', 'DLLTutorial.h')
Warning: Message from C preprocessor:
lcc preprocessor error: C:\Users\MAHNAZ\Documents\MATLAB\DLLTutorial.h:3 Could not find include file
How can i say to Matlab that use visual c++ compiler instead of LCC??
What version of MatLab are you using? It might not suppose the version of the Microsoft SDK you have installed on your computer. This isn't really an answer but I can't post comments yet.
As per your description, after you type mex -setup, the first thing MATLAB should ask you:
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n?
After this, you should press y and then you should see a list of available compilers. Choose a right one from them.
What version of Windows are you working with, is it 32 or 64 bit (question for both Windows and the MATLAB version installed)?
Looking the archived documentation for R2008a (you must be logged in to see the page), it seems that LOADLIBRARY requires VS2005 on 64-bit platforms (perhaps it defaults to LCC if its not available). The truth is it does not explicitly say how it determines what compiler to use. (If you are up to it, you can edit loadlibrary.m and trace the execution to see why it ends up calling LCC instead of Visual C++)
Compare this with the current R2012a help page where it clearly says that you must select the compiler with mex -setup.
Note that LCC compiler will no longer be shipped with future versions.
I have a set of facial features that i have obtained and would like to classify using SVM. I intend to use libsvm package and use MATLAB to carry out the training.I have already read up on SVM by watching the Stanford lecture. But I am not sure how to use libsvm to start.. Need some guidance...
In matlab you can link your matlab code with some programs implemented in c. This a called a mex-file.
However you need to compile them, to make it work.
You can read the readme file to know how to compile them:
Installation
On Unix systems, we recommend using GNU g++ as your compiler and type
'make' to build 'svmtrain.mexglx' and 'svmpredict.mexglx'. Note that
we assume your MATLAB is installed in '/usr/local/matlab', if not,
please change MATLABDIR in Makefile.
Example:
linux> make
To use Octave, type 'make octave':
Example: linux> make octave
On Windows systems, pre-built binary files are already in the
directory `..\windows', so no need to conduct installation. Now we
include both 32bit binary files and 64bit binary files, but in future
releases, we will provide binary files only for 64bit MATLAB on
Windows. If you have modified the sources and would like to re-build
the package, type 'mex -setup' in MATLAB to choose a compiler for mex
first. Then type 'make' to start the installation.
Example:
matlab> mex -setup
(ps: MATLAB will show the following messages to setup default compiler.)
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/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C/C++ 7.1
Location: C:\Program Files\Microsoft Visual Studio
Are these correct?([y]/n): y
matlab> make
For list of supported/compatible compilers for MATLAB, please check
the following page:
http://www.mathworks.com/support/compilers/current_release/
I have developed code on a m-file script in Matlab that communicates with a Measurement Computing USB-DAQ module, and I'm quite happy with that. The problem is that I don't want to purchase another license for the computer which is running the code. I have looked into Matlab Compiler Runtime tools, and it claims that I can deploy my mcc built executables to be royalty-free. Does that mean I can install the MCRInstaller (copied from the computer in which the Matlab is installed) on the host computer running the final product?
Yes. You install the Matlab Compiler Runtime (MCR) on the host computer that will be running the executable produced by the Matlab compiler.
Yes, you can install MCR and using the Deployment Tool it's easy to create a software package with all the files you need inside.