Why am I unable to distribute my stand-alone application built with the demo version of the MATLAB Compiler 3.0 (R13)?

1 view (last 30 days)
Why is the MGLINSTALLER missing from my demo version of the MATLAB Compiler?
Why does an executable that is created using the demo version of the MATLAB Compiler check for the license file?
I installed the demo version of MATLAB with the MATLAB Compiler on my machine without any problems. To test out the compiler setup I compiled a simple example.
When I ran the compiled .exe file it gave me the following error:
Could not check out a license for CPP_Math_Library
It turns out it was searching the wrong path and was finding the license for the non-demo version of MATLAB that I also have installed on my machine. I fixed this path and the executable ran fine. However, it concerned me that the executable required a license file to run. Also, it seems I am missing the MGLINSTALLER that is used when distributing my stand-alone application.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
A demo version of the MATLAB Compiler 3.0 (R13) limits users such that they are not allowed to distribute their compiled stand-alone application. The full version of the MATLAB Compiler is necessary in order to distribute your compiled application to others.
There are two ways in which the demo version of the MATLAB Compiler differs from the full version:
First, the MGLINSTALLER, which normally resides in the following directory, does not exist in the Demo version of the MATLAB Compiler and Libraries:
$MATLAB/extern/lib/win32 (where $MATLAB is the root MATLAB directory)
The MGLINSTALLER is needed to distribute stand-alone applications to users who do not own MATLAB. This is not necessary in the demo version of the MATLAB Compiler because applications created with the demo version cannot be distributed.
Second, stand-alone applications created with the demo version of the MATLAB Compiler require a license file before they will run. This license file should be located in your $MATLAB\bin\win32 directory. That directory must be on the system path before any other installation of MATLAB.
If you install the stand-alone application on a system that does not have MATLAB, you will receive an error such as:
Could not check out a license for CPP_Math_Library
or
License Checkout Failed...
With the full version of the MATLAB Compiler, the generated executable does not check for any licenses. This is only used to prevent distribution of applications created using the demo version of the MATLAB Compiler.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!