Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
No .ctf file generated by MATLAB compiler

Subject: No .ctf file generated by MATLAB compiler

From: Scott Dobbins

Date: 17 Sep, 2008 16:04:03

Message: 1 of 11

I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.

According to the MATLAB compiler documentation, I need to:
1)Run MCRInstaller.exe on the target computer
2)Copy the .exe file (my m file compiled) to the target computer
3)Copy the .ctf file to the target computer.

Questions:
1) Are these three the only files needed in the package?
2) What folder do I copy the .exe to on the target computer? Does it matter?
3) The .ctf file is supposed to be automatically generated by the compiler. This didn't happen. I searched for *.ctf on my computer and came up with zilch. I'm using the -m compiler option and no other. Do I need to add/change compiler options to get my .ctf file?
4) Once I do get the .ctf, what folder do I copy it to on the target computer?

Editorial:
Mathworks should have created a wizard to do compiling and create a self extracting executable for the target machine AUTOMATICALLY. Following the MATLAB compiler documentation is like following a badly written program with GOTOs all over the place. I'm trying to do a job in a reasonable amount of time, not be an expert on the intricacies of compiling and preparing a package. That's the sort of thing computers are really good at. And yes, I have sent this off to Mathworks for feedback.

Thanks for your help.

Scott

Subject: No .ctf file generated by MATLAB compiler

From: Stephen Lienhard

Date: 17 Sep, 2008 16:40:21

Message: 2 of 11

"Scott Dobbins" <scott.dobbins@seagate.com> wrote in message <gar9pj$j3o$1@fred.mathworks.com>...
> I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.

<snip>

> Mathworks should have created a wizard to do compiling

Check out the _deploytool_. Type deploytool at the command line.


Stephen

Subject: No .ctf file generated by MATLAB compiler

From: Scott Dobbins

Date: 17 Sep, 2008 20:24:03

Message: 3 of 11

"Stephen Lienhard" <2bike4+cssm@gmail.com> wrote in message <garbtl$da7$1@fred.mathworks.com>...
> "Scott Dobbins" <scott.dobbins@seagate.com> wrote in message <gar9pj$j3o$1@fred.mathworks.com>...
> > I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.
>
> <snip>
>
> > Mathworks should have created a wizard to do compiling
>
> Check out the _deploytool_. Type deploytool at the command line.
>
>
> Stephen

Stephen:

Thanks for responding.

Deploytool looks pretty handy. I took my existing project and packaged it successfully. Well, I don't know how successful it will be until I run the *_pkg.exe file. But the packager said "Packaging completed" so that's a good sign. Thanks again.

Subject: No .ctf file generated by MATLAB compiler

From: Matt

Date: 17 Sep, 2008 21:37:02

Message: 4 of 11

>Following the MATLAB compiler documentation is like following a badly written program with GOTOs all over the place. I'm trying to do a job in a reasonable amount of time, not be an expert on the intricacies of compiling and preparing a package. That's the sort of thing computers are really good at. And yes, I have sent this off to Mathworks for feedback.


I agree about the documentation.

I'm currently wrestling with the same kind of thing.

One comment though. The readme.txt produced output by deploytool seems a bit better than the online compiler documentation. It produces deployment instructions that are a bit more up-to-date and more self-contained.

Subject: No .ctf file generated by MATLAB compiler

From: Bill

Date: 18 Sep, 2008 01:14:03

Message: 5 of 11

I'm sorry, but I had no trouble at all compiling a VERY complicated Matlab job created with Guide. It compiled, produced .exe and .ctf files and MCRInstaller came along for the ride. It unpacked at my users network and they went on with their job.

Did I mention that I learned to read in 2nd grade? (I went to public school). Good Grief......................

Subject: No .ctf file generated by MATLAB compiler

From: Matt

Date: 18 Sep, 2008 05:53:02

Message: 6 of 11

"Bill " <william.nospam.a.cobb@gm.com> wrote in message <gasa0r$5d1$1@fred.mathworks.com>...
> I'm sorry, but I had no trouble at all compiling a VERY complicated Matlab job created with Guide. It compiled, produced .exe and .ctf files and MCRInstaller came along for the ride. It unpacked at my users network and they went on with their job.
>
> Did I mention that I learned to read in 2nd grade? (I went to public school). Good Grief......................

Well, that's very fortunate for you, but Scott is not wrong. Not all versions of the compiler produce .ctf files, apparently, and mine was the same way. Nor did I find anything in the user documentation explaining that .ctf files may not be generated. I found it only in the readme.txt file produced by deploytool. If it's in the documentation, so be it, but it's obscure.

In any case, Scott, the .exe file produced by the compiler does seem to be self-sufficient, and not to require .ctf files.

Subject: No .ctf file generated by MATLAB compiler

From: Sean Geary

Date: 18 Sep, 2008 18:00:55

Message: 7 of 11

On Sep 18, 1:53=A0am, "Matt " <mjacobson.removet...@xorantech.com>
wrote:

> In any case, Scott, the .exe file produced by the compiler does seem to b=
e self-sufficient, and not to require .ctf files.

Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.

Subject: No .ctf file generated by MATLAB compiler

From: Matt

Date: 18 Sep, 2008 20:37:02

Message: 8 of 11

Sean Geary <gearysr@gmail.com> wrote in message <c360ec02-9f93-4006-8c0b-15597dd3bb47@x41g2000hsb.googlegroups.com>...
> On Sep 18, 1:53=A0am, "Matt " <mjacobson.removet...@xorantech.com>
> wrote:
>
> > In any case, Scott, the .exe file produced by the compiler does seem to b=
> e self-sufficient, and not to require .ctf files.
>
> Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
> For older versions it is not.


thanks. good to know.

Subject: No .ctf file generated by MATLAB compiler

From: Dean Fang

Date: 25 Sep, 2008 18:29:02

Message: 9 of 11

Sean Geary <gearysr@gmail.com> wrote in message <c360ec02-9f93-4006-8c0b-15597dd3bb47@x41g2000hsb.googlegroups.com>...
> On Sep 18, 1:53=A0am, "Matt " <mjacobson.removet...@xorantech.com>
> wrote:
>
> > In any case, Scott, the .exe file produced by the compiler does seem to b=
> e self-sufficient, and not to require .ctf files.
>
> Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
> For older versions it is not.
More FYI: You can force MATLAB to generate ctf files with deploytool. Open the cpj file with deploytool and go to settings. In 'General', uncheck the 'Embed CTF archive into the Application'. Although under most circumstances, maybe embedding the CTF is a better choice.

Subject: No .ctf file generated by MATLAB compiler

From: Cross

Date: 25 Nov, 2008 17:44:02

Message: 10 of 11

"Dean Fang" <fang@case.edu> wrote in message <gbgl9e$ebs$1@fred.mathworks.com>...
> Sean Geary <gearysr@gmail.com> wrote in message <c360ec02-9f93-4006-8c0b-15597dd3bb47@x41g2000hsb.googlegroups.com>...
> > On Sep 18, 1:53=A0am, "Matt " <mjacobson.removet...@xorantech.com>
> > wrote:
> >
> > > In any case, Scott, the .exe file produced by the compiler does seem to b=
> > e self-sufficient, and not to require .ctf files.
> >
> > Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
> > For older versions it is not.
> More FYI: You can force MATLAB to generate ctf files with deploytool. Open the cpj file with deploytool and go to settings. In 'General', uncheck the 'Embed CTF archive into the Application'. Although under most circumstances, maybe embedding the CTF is a better choice.

Yes, right. But without CTF file, how can I access the files I have added into the compiled exe file?
I need to fetch some of the added files as configuration.

Cross

Subject: No .ctf file generated by MATLAB compiler

From: Peter Webb

Date: 26 Nov, 2008 15:10:57

Message: 11 of 11

Once the files have been placed into a CTF archive, they are really not
useful to anything but the compiled application. M-files will be encrypted,
and locked to that particular application, so they can't be used with any
other compiled applications. Nor can you execute them in MATLAB.

If you just wish to store them, for achival purposes, you can find them in
the MCR Cache. Here's the documentation page explaining how to view and
manipulate the MCR Cache:

http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/index.html?/access/helpdesk/help/toolbox/compiler/brl4_f1-1.html&http://www.mathworks.com/cgi-bin/texis/webinator/search/

Alternatively, you can generate a CTF archive separate from your executable
by using the mcc flag -C.

"Cross " <zxtimes-4@yahoo.com.cn> wrote in message
news:gghdh2$eoh$1@fred.mathworks.com...
> "Dean Fang" <fang@case.edu> wrote in message
> <gbgl9e$ebs$1@fred.mathworks.com>...
>> Sean Geary <gearysr@gmail.com> wrote in message
>> <c360ec02-9f93-4006-8c0b-15597dd3bb47@x41g2000hsb.googlegroups.com>...
>> > On Sep 18, 1:53=A0am, "Matt " <mjacobson.removet...@xorantech.com>
>> > wrote:
>> >
>> > > In any case, Scott, the .exe file produced by the compiler does seem
>> > > to b=
>> > e self-sufficient, and not to require .ctf files.
>> >
>> > Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
>> > For older versions it is not.
>> More FYI: You can force MATLAB to generate ctf files with deploytool.
>> Open the cpj file with deploytool and go to settings. In 'General',
>> uncheck the 'Embed CTF archive into the Application'. Although under most
>> circumstances, maybe embedding the CTF is a better choice.
>
> Yes, right. But without CTF file, how can I access the files I have added
> into the compiled exe file?
> I need to fetch some of the added files as configuration.
>
> Cross

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us