MATLAB Runtime Server | ![]() ![]() |
Generate runtime P-code for application
Syntax
[log,depfunout,pcodeout] = buildp(files);
[log,depfunout,pcodeout] = buildp(files,'develStruct
','',verbose);
Description
The buildp
function generates runtime P-code for a runtime application based on the filenames listed in files
. The outputs report status and possible problems.
[log,depfunout,pcodeout] = buildp(files)
determines the direct and indirect dependencies of the filenames listed in the cell array files
. For each subordinate M-file, this command generates a runtime P-file and places it in the same directory with the M-file.
[log,depfunout,pcodeout] = buildp(files,'
is the same as the first syntax, except that if develStruct
','',verbose)
verbose
is 1, then buildp
sends output to the command window.
Inputs
files
is a cell array of strings. Each string is the name of a file that is part of your runtime application. If one function in your application depends on another, then you do not need to list the subordinate function when invoking buildp
.
If verbose
is 1, then buildp
sends output to the command window; if verbose
is 0 or absent, then buildp
suppresses such output.
Outputs
The output log
is a string containing the name of a file that details the various phases of execution of buildp
.
The outputs depfunout
and pcodeout
are cell arrays that give information about what happens when buildp
invokes depfun
and pcode
while executing. depfunout
contains the output from depfun
, which indicates possible problems finding or parsing the runtime application's files. pcodeout
indicates whether buildp
had problems creating P-files for the application.
These outputs are useful for troubleshooting, and for checking whether you need to consider functions that your application invokes via an eval
command.
Example
creates P-code for the runtime application whose top-level file is matlabrt
.
Suppose the log file from the command above indicates that some file in the runtime application includes an evalc
command. If you examine the instance and determine that the command might invoke either of the files comp1
and comp2
, then you can issue this second buildp
command to complete the building of the runtime application.
Example
creates P-code for a runtime application whose top-level files are the two independent files startup\matlabrt
and mainfiles\myapp
. (If matlabrt
invokes myapp
, then you do not need to list myapp
in the call to buildp
. Similarly, if myapp
invokes matlabrt
, then you do not need to list matlabrt
in the call to buildp
.)
See Also
![]() | Functions - Alphabetical List | cleanp | ![]() |