deploying standalone .exe for xpc control gui problem !! please help !!
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hey guys ! this is my graduation project and its really important for me to get this working asap ! I have learned alot from the community over here (matlab self taught) and was hoping some one could help out one more time !
lets jump to the problem ... I know a thing or two about matlab, developing models, m-files, blah blah blah , when it comes to C and compilers and stuff, not so much. I have a machine thingy thats got 2 motors and 2 encoders, I am running it using xpc and a dedicated target computer. communication over TCP, downloaded the infinity famous xpc_gui_demo and I am controlling the target from the host using this gui. now all the fine tuning has been done and I am happy with it.
now I am trying to make a standalone .exe of the control gui using the deploytool, but this is where I come short. Here is the log file I get during a compilation attempt. guys please advice, ANYTHING even if ur not 100% sure, I am going nuts here and will try anything that sounds remotely correct to get this thing working ! Thanks alot !
Log file:
ant:
<mkdir dir="C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\deploy_T1\deploy_T1\distrib" />
<mkdir dir="C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\deploy_T1\deploy_T1\src" />
mcc -o deploy_T1 -W WinMain:deploy_T1 -T link:exe -d 'C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\deploy_T1\deploy_T1\src' -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v 'C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\xPC_GUIdemo.m' -a 'C:\Program Files\MATLAB\R2012a'
Compiler version: 4.17 (R2012a)
Depfun error: 'Error: File: C:\Program Files\MATLAB\R2012a\help\techdoc\matlab_oop\examples\@AccountManager\AccountManager.m Line: 3 Column: 13
Attempt to execute SCRIPT true as a function:
C:\Program Files\MATLAB\R2012a\toolbox\compiler\mcr\matlab\elmat\true.m'
have no clue on how to deal with the above Depfun (deploy function) error !! I have tried a million times compiling and there was always a file missing (something along superclass cannot be found) so I just added the whole matlab root folder and the compiler chooses what ever it needs from it ? is this right? is that the problem ??
5 Commenti
Walter Roberson
il 9 Lug 2012
"script" is a technical term for MATLAB, and refers to a .m file in which the first executable line does not start with "function" (a function file) or "classdef" (a class definition file.)
It should not be attempting to execute true.m . true() is a built-in function that does not need .m code, except for the fact that the "help" function looks in the .m file for the help information. The fact that it is attempting to execute true.m indicates that something very strange is going on. Either somehow the current directory got set to the directory with the true.m file, or else MATLAB lost track of the internal code library that has the actual code for "true" in it. The only times I have seen something similar have been when there has been corruption of the installation, or when the Compiler has gotten fouled up because the main .m file was a script (in the sense described above.)
Risposte (1)
Image Analyst
il 8 Lug 2012
Have you run the Dependency Report on your code before you compiled it? Another more comprehensive tool is fdep ( http://www.mathworks.com/matlabcentral/fileexchange/17291s
You could also try depfuntoolbox: http://www.mathworks.com/matlabcentral/fileexchange/14176-depfuntoolbox
Then, after you get it to compile and it won't run on your target computer, check the FAQ: http://matlab.wikia.com/wiki/FAQ#My_standalone_executable_won.27t_run_on_the_target_computer._What_can_I_try.3F
2 Commenti
Image Analyst
il 9 Lug 2012
I never have a compilation line this complicated:
mcc -o deploy_T1 -W WinMain:deploy_T1 -T link:exe -d 'C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\deploy_T1\deploy_T1\src' -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v 'C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\xPC_GUIdemo.m' -a 'C:\Program Files\MATLAB\R2012a'
Occasionally I'll have the -d switch to send the executable to a different folder, or the -a option to include things like DLLs. What happens if you simply try
mcc -m deploy_T1.m -d 'C:\Users\Ahmed Atlam\Desktop\Target_Working_Folder\deploy_T1\deploy_T1\src'
Vedere anche
Categorie
Scopri di più su Target Computer Setup in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!