MATLAB: Do I get a license error when I try to run an executable I created using the demo version of the Math or Graphics Library

checkoutdemographicslibrarylicensemathMATLAB C/C++ Math Librarymlfscalarstandalonetrial

I can successfully compile my code into an executable, but when I run it, I receive the following error:
Error: Could not find a demo license
Cannot find license file (-1,73:2)

Best Answer

The demo version of Math and Graphics Libraries require a copy of the license file to exist in the same folder as the executable. To resolve the problem:
1. Make a copy of the license file that's in your $MATLAB/bin folder
2. Call it "demo.dat"
3. Save it in the same folder as your executable
4. Now try running the executable again.
NOTE: Applications created with the demo version of the Math and Graphics Libraries cannot be redistributed. This is a limitation of the demo version of these products. If you would like to redistribute your application, please purchase the full version of the Math and Graphics Libraries.