addpath not work after compile

 채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 25일

0 개 추천

You are trying to addpath() a routine that is not in the archive. I would not expect that to work; and if it did work I would consider it to likely be a license violation.

댓글 수: 8

pink
pink 2011년 6월 25일
in the folder "forminput" is there a gui that is "input.m ', before the built, the gui to work but after compiled if I had not called sub gui" input "
perhaps you can look at this tutorial that I follow this
http://blinkdagger.com/matlab/pimp-my-gui-part-3-help-me-help-yourself/#comments
Walter Roberson
Walter Roberson 2011년 6월 25일
The tutorial you point to gives me no reason to expect that addpath() would work in compiled mode.
Everything you need to execute your compiled program should be compiled in to your program. Remember, the idea is that you should ideally be able to ship the single self-extracting archive to another system, and as long as they have the correct version of MCR installed, the program should "just work", without having to copy any additional source directories.
By the way, your question mostly disappeared. You probably tried to edit it. There is a known bug in this forum in constructing text that has quoted lines. See http://www.mathworks.com/matlabcentral/answers/994-wish-list-for-matlab-answer-sections#answer_3755 for more information on that bug.
pink
pink 2011년 6월 25일
I followed the tutorial on that site, if the sub-gui before it is compiled, the sub-gui to work but after compiled sub-gui is not working.
function pushbutton1_ClickedCallback(hObject, eventdata, handles)
addpath(fullfile(pwd,'forminput'))
inputdata%sub gui
whether there is an error on addpath () in the sub folder called gui
Walter Roberson
Walter Roberson 2011년 6월 25일
The tutorial you pointed to has nothing to say about compiling. Compiling has different restrictions than interactive use.
pink
pink 2011년 6월 25일
so what should I do to correct the problem, please advice
Walter Roberson
Walter Roberson 2011년 6월 25일
If you are using mcc directly to build the CTF, then use the -I option instead of addpath() http://www.mathworks.com/help/toolbox/compiler/f13-998741.html
If you are using deploytool, you would add the files you need to the Source Files area.
pink
pink 2011년 6월 25일
yes,I use deploytool, so what if there is a gui (subgui) or sub-functions in a folder, because the condition of my program like that, do I have to remove the folder and put all files with file maingui?
and how to run the gui without a command prompt (DOS) if using deploytool?
Walter Roberson
Walter Roberson 2011년 6월 25일
I am not familiar with how deploytool is used, sorry.

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

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 6월 25일

0 개 추천

I wonder if it has anything to do with the fact that input() is a built-in function. Is it possible that you change your function name and re-try?

댓글 수: 1

pink
pink 2011년 6월 25일
I had several times changed the name sub-gui, but at the time of the compilation results remain the same, why?

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

카테고리

도움말 센터File Exchange에서 Standalone Applications에 대해 자세히 알아보기

태그

질문:

2011년 6월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by