| Author |
MAT files : MATLAB COMPILER
|
|
|
| Hi all,
I'm a newbie with matlab compiler. I'm trying to compile a certain
set of M-Files and these m-files also require certain data
files(*.MAT).
When I compile using the following commands :
mcc -mv file1 file2....fileN data1.mat data2.mat
(LCC is my compiler)
I get the following error
data1.mat: unknown file type
C:\MATLAB\R2006A\BIN\MEX.PL: Error: Link of 'file1.exe' failed.
Error: An error occurred while shelling out to mbuild (error code =
1).
Unable to build executable.
??? Error executing mcc, return status = 1.
Can someone tell me what wrong am I doing ? I'm trying to create a
standalone application for my set of code.
Regards
Vivek
| |
| French Caro 2006-09-13, 4:12 am |
| Hi,
You don't have to comile the MAT-File : just move them where the
exe-file is created (you must be sure that they are loaded without a
specific path).
Caroline
| |
|
| Thanks for that. I'm sure it will work....
unfortunately i'm facing the problem of not getting the compiled
version to work....
I used LCC to compile my code......I installed MCR to a appropriate
directory. The path to it has been added into my environ.
variables.... when i try to run the *.exe from command line, it gives
me the following error
"This application has failed to start becoz mclmcrrt74.dll was not
found. re-installing the application may fix the problem"
any clue as to why.....i have reinstalled MCR thrice.....
regards
vivek
| |
| Billy 2006-09-13, 10:09 pm |
| Hi Viviek,
Thanks for that, after i changed it to fuction, i got the following
error:
Could not locate mclmcrrt.lib
C:\MATLABSP2\BIN\WIN32\\..\WIN32\MEX.PL: Error: Link of 'test1.exe'
failed.
I have installed MCR, but i saw in help it is not necessary if matlab
is already installed. Inside the "bin" folder of MCR i can see
mclmcrrt72.lib
Thanks
Billy
| |
| vivek 2006-09-13, 10:09 pm |
| Hi Billy, I have created a README FILE for distributing matlab
compiled codes...I have pasted it below....not sure if this will help
you or not...but i was getting an error saying that same *.dll file
is missing. SO i followed certain steps and was successful in running
the *.exe.
here you go......
1. Install MCR Utility on your machine to run the executable.
2. Say MCR is installed into "C:\Program Files\MATLAB\MATLAB
Component Runtime\v74".
3. Create a NewFolder say - TEST in the directory where MCR was
installed in Step-1. Thus the location of directory "TEST" would
be "C:\Program Files\MATLAB\MATLAB Component Runtime\v74\TEST".
4. Copy all the files *.exe/*.c/*.ctf files to "TEST" directory.
5. Double Click on "*.exe" file. Once its done without giving any
errors, it will extract the required files and create a new
folder within the directory "TEST".
6. Copy all the required data(*.mat or *.dat) and image files to
the "work" folder within the NEWFOLDER created inside the
directory "TEST".
Now, there are 2 methods to run the code.
-----------------------
METHOD 1 - SHORTCUT
-----------------------
1. Double click the TEST.exe file to execute it.
-------------------------------
METHOD 2 - Using Command Prompt
-------------------------------
1. Click on WINDOWS START BUTTON(bottom left corner).
2. Click on RUN and type "cmd" and press ENTER.
3. On the command prompt make sure you just have the C:\> prompt.
Incase you have the prompt like this
c:\Some Directory\Some Other Directory>
Then keep typing "cd.." and ENTER till the prompt comes back to
c:\>
4. Now type in "cd Program Files\MATLAB\MATLAB Component
Runtime\v74\TEST". Your path may be different depending upon where
the MCR utility was installed and where you created the FOLDER for
keeping the executable files.
5. Now type in the name of your executable on the cmd prompt in my
case it looked like this
c:\Program Files\MATLAB\MATLAB Component Runtime\v74\TEST>TEST.exe
and press ENTER
6. The file should execute as expected.
cheers
vivek
|
|
|
|