Why can't I create a deployable archive (.ctf) with code containing enumerations in R2015a
Show older comments
We want to upgrade our MatLab Production Server from 2013b to 2015a. When I try to create a Deployable archive of our software with the 2015a compiler I get an "Invalid file types" error after selecting the .m files in the EXPORTED FUNCTIONS dialog. We also get the message "Only MATLAB functions and MEX Files with a single entry point are acceptable as exported functions.", then a list of the four enumeration files are listed beneath. If I exempt the enumeration .m files in the EXPORTED FUNCTIONS dialog then I get no errors. The same code compiles with no problems under the 2013b compiler. We do have both MatLab 2013b and MatLab 2015a desktop versions with compiler installed on the same computer with only the 2015a running, both installed to their default locations on the C drive. I've done a lot of Googling about this problem but come up empty handed. Hope someone can help with this problem.
Accepted Answer
More Answers (1)
shwetha gn
on 3 Feb 2020
Edited: Walter Roberson
on 3 Feb 2020
make your code as a function
Try the following syntax:
function output1 = Your_function_name() % just preced your code with this statement with an appropriate function name
% Your code
end
For example:
function output1 = addn()
a=1;
b=2;
output1=a+b;
end
then in command window type
deploytool
select library compiler
if it is a dot net application select .Net Assembly then click on + symbol to include the .m function, then finally click on package
to build the dll file.
Categories
Find more on Standalone Applications 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!