Azzera filtri
Azzera filtri

Supporting files are not working in deployed .exe

1 visualizzazione (ultimi 30 giorni)
Hi
I have generated a package with some GUIs and functions and some supporting files like shapefiles, images etc.
But after deploying that package into .exe form, supporting shapefiles (.shp) files are not working. Then I have tried to use them by converting into matrix (.mat)file, but then also its not working.
Why MATLAB deployed .exe is not able to read .shp and .mat files?
Please help me out in this regard. Any sort of help is appreciated.
Thanks in advance.

Risposta accettata

Image Analyst
Image Analyst il 14 Lug 2013
Chances are you didn't specify the full filename of the files and just ignored any folder and assumed the file will be in the same folder as the executable. Bad assumption. For this to even have a chance of working, you'd have to bundle the files with the executable with the -a option. The reason is that the executable you think you are running is not the real executable but a self-unarchiving program that unpacks the real executable somewhere else but does not copy everything else (like the special files you shipped) in that folder to there. Better is to put these files into a known folder, then use fullfile() to construct the full path name of the file, and use exist(fullFileName, 'file') to check that the file exists before you try to do anything with it. It's just robust programming.
  5 Commenti
Friedrich
Friedrich il 17 Lug 2013
Mhh, can you narrow down the line where it hangs or stops? (add some disp commands) Please compile it as console application and run it from a DOS prompt/shell in order to see any warning/error which might be thrown.
rahul
rahul il 17 Lug 2013
Thanks friedrich and Image analyst. It worked now since i added the path for landareas.shp, earlier it was not included.
Thanks

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su MATLAB Compiler 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!

Translated by