Compiler - making standalone file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Folks, I made a standalone, executable file of my code using deploytool and it works fine. However, it doesn't run four sorts of functions which contain path (for example: C:/.../myfolder). The functions that it can't run are:
- publish(c:/.../myfolder)
- open(c:/.../myfolder)
- system(c:/.../myfolder)
- delete(c:/.../myfolder)
It does run the plot though. My matlab is 2012a. These abovementioned features are essential elements of the code and I really need to run them without having to manipulate or remove them. Is there anyway that I can resolve this problem? You time and help will be much appreciated.
0 Commenti
Risposta accettata
Walter Roberson
il 14 Ago 2013
No, you cannot resolve the problem without changing what you have.
When you run an executable, then unless you change the Properties in the icon you use to launch it with, the executable with start executing in a directory that is created on the fly to hold the unpacked components of the standalone. The executable will not generally start from the directory that you are in at the time that you click to launch the executable.
Even if you were in the correct directory, when you deploy to somewhere else, they will not generally have whatever executables or scripts that you have stored in your folder that you are using system() on. Not unless you have included them in the deployment and copy them to the appropriate place.
Please have a look at ctfroot()
2 Commenti
Friedrich
il 14 Ago 2013
Besides from that correct answer from Walter a small additional note. The function "publish" is one of the functions which cannot be compiled. So your standalone needs to get rid of the publish calls.
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!