MATLAB compiler and superiorto
Show older comments
I have a piece of MATLAB code that I'm trying to compile into a standalone. The uncompiled version works fine, but when I compile it and run from a DOS command window, I encounter an error
Unknown class 'SeparableLinearOp' used in builtin function 'SUPERIORTO'
The call to superiorto is in the constructor of a second, old-style class. The class SeparableLinearOp is not being used, so I didn't provide code for it. Because SeparableLinearOp is not being used, the M-code version doesn't care about its absence. Why does the compiled version care?
Accepted Answer
More Answers (1)
Image Analyst
on 10 Oct 2012
0 votes
Are you sure it's not being used. Run this:
and really check for it. It might be buried in there unbeknownst to you through a call to a function you don't suspect is using it. Generally you can' compile in modules that have extensive user interfaces with them - for example imtool. When you compile, the excluded log will list files that cannot be included in the compiled versions.
6 Comments
Image Analyst
on 11 Oct 2012
Did you try fdep? It's really comprehensive at listing all the subfunctions that are used.
Issue this command:
fprintf('The secret ctfroot folder is %s\n', ctfroot);
in your startup code for your m-file. When it runs on the target machine, it will show you where that secret location is. Go there and poke around to see what it shipped with your application.
Have you tried all the things in the FAQ? http://matlab.wikia.com/wiki/FAQ#My_standalone_executable_won.27t_run_on_the_target_computer._What_can_I_try.3F If all else fails, you can call tech support - might as well get some support for all the money you spent on the compiler.
Image Analyst
on 11 Oct 2012
I agree with point 2. If it's one of the Mathworks routines, it should have been there. If it's someone else's it won't be there and you have to ship it separately or have deploytool include it as an extra shippable file. fdep is a lot more comprehensive that the dependency report. Looks like tech support may be your final option. Come back here and report what finally fixes it, or add it to the FAQ's compile problems section.
Matt J
on 11 Oct 2012
Image Analyst
on 11 Oct 2012
I didn't disagree with point 1, I just didn't have any comment on it. I have no explanation for what you're seeing. As you know, it makes little sense.
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!