필터 지우기
필터 지우기

Supporting files are not working in deployed .exe

조회 수: 1 (최근 30일)
rahul
rahul 2013년 7월 14일
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.

채택된 답변

Image Analyst
Image Analyst 2013년 7월 14일
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
Friedrich
Friedrich 2013년 7월 17일
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 2013년 7월 17일
Thanks friedrich and Image analyst. It worked now since i added the path for landareas.shp, earlier it was not included.
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by