From: Clayton Tong on
I am getting varying results when I run the mcc compiler with the 'Embed CTF archive into the Application' option turned on (create_CTF = false) - sometimes the produced exe is about 1 1/2 mbytes and all is good (the exe runs as expected), and other times the exe produced is only 36 kb (vastly smaller), and of course it doesn't work. Attempting to run this small executable gives "Undefined function or variable 'matlabrc'." - it reminds me of the exe that is created if I had requested that the ctf file be included in the build (but of course a ctf file doesn't exist, ergo the error). I am building using the deploytool (not calling mcc directly), and I've run it numerous different ways after various key clicks and have yet to figure the exact sequence that will force the build to build correctly - any ideas out there?
From: Clayton Tong on
I'm pulling out my hair trying to get a consistent build - sometimes it builds correctly the first time, other times I try half a dozen times and it never builds correctly. It seems completely random - no correlation between what I do and the outcome. Any ideas about what I should do or sequence of events that might affect the exe contents?
From: Steven Lord on

"Clayton Tong" <claytont(a)navsys.com> wrote in message
news:hruv71$7se$1(a)fred.mathworks.com...
> I'm pulling out my hair trying to get a consistent build - sometimes it
> builds correctly the first time, other times I try half a dozen times and
> it never builds correctly. It seems completely random - no correlation
> between what I do and the outcome. Any ideas about what I should do or
> sequence of events that might affect the exe contents?

I don't think you've posted enough information to diagnose the problem. I
recommend that you work with Technical Support to determine the cause of the
problems you've been experiencing and how to correct that cause. Some of
the information you should provide to Support:

1) What version of MATLAB and MATLAB Compiler you're using (which you can
determine using the VER function)
2) What operating system you're using
3) The specific code you're trying to compile
4) The exact sequence of steps you follow in the DEPLOYTOOL to compile your
application
5) If possible, a copy of the small (36 KB) application that doesn't work
correctly

You can contact Support via the "Contact Us" link at the top of
http://www.mathworks.com.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Clayton Tong on
>
> 1) What version of MATLAB and MATLAB Compiler you're using (which you can
> determine using the VER function)
> 2) What operating system you're using
> 3) The specific code you're trying to compile
> 4) The exact sequence of steps you follow in the DEPLOYTOOL to compile your
> application
> 5) If possible, a copy of the small (36 KB) application that doesn't work
> correctly

Not much too much info to share - the problem seems rather basic. I am running version 4.9, the first version that supported embedding ctf's into exe's, on WinXP SP3. Once I start up Matlab (R2008b), I start deploytool. Then I open a project file. Then I 'Build'. Output is on the Verbose setting. No errors are given during the build; in fact, a bit by bit compare of the output from a working build and a problematic build only differ in the timestamps that they were kicked off at. There is no indication that the build didn't work just fine, only the exe is 36kb instead of the expected 1meg+ - I presume this is because the ctf didn't actually get embedded into the exe.

Here's the top portion of the .prj file:

<?xml version="1.0" encoding="utf-8"?>
<project><!--UpdateEphemeris.prj-->
<MCCProperties>
<output>UpdateEphemeris</output>
<wrapper>
<type>main</type>
<component_name>UpdateEphemeris</component_name>
<default_class>Main function</default_class>
</wrapper>
<intermediate_dir>build\src</intermediate_dir>
<output_dir>build</output_dir>
<link>exe</link>
<MCR_runtime_options/>
<generate_code_only>false</generate_code_only>
<verbose>true</verbose>
<create_CTF>false</create_CTF>
<options_file/>
<debug>false</debug>
<toolboxes_on_path shortcut="all"/>
<warning shortcut="default">
<warn name="specified_file_mismatch">enable</warn>
<warn name="repeated_file">enable</warn>
<warn name="switch_ignored">enable</warn>
<warn name="missing_lib_sentinel">enable</warn>
<warn name="demo_license">enable</warn>
</warning>
</MCCProperties>
<file_info>
<category name="Main function"><!--Do not modify the value of the name attribute, unless it is a class name.-->
<file>$(PROJECTDIR)/matlab/cameratidget.matlab/cors_data/UpdateEphemeris.m</file>
</category>
<category name="Other files"><!--Do not modify the value of the name attribute, unless it is a class name.-->
<file>$(PROJECTDIR)/externals/Oracle_10_1_0_5/ojdbc14.jar</file>
</category>
<category name="C/C++ files"><!--Do not modify the value of the name attribute, unless it is a class name.--></category>
</file_info>
<packaging>
<name>Untitled2_pkg</name>
<mcr include="true">
<location>default</location>
</mcr>
<additional_files/>
</packaging>
<MATLABPath>
....