Why are some of my functions ‘Undefined’ in my standalone executable compiled from MATLAB source and pcode files?
I have a MATLAB standalone app compiled from many different source code files. Some of the dependencies for this app are sensitive IP so I identified all required files using requiredFilesAndProducts and I obfuscated those sensitive dependencies (since source code is to be delivered as part of this project). Some of those dependencies use functions from other dependencies so I recursively called requiredFilesAndProducts to get a complete list of all required files. From that list, I then ran pcode against the sensitive IP and gathered all the pcode files into one location.
When I compile the standalone executable, I add the path to the pcode folder addpath(genpath(‘C:pathtopcodefolder’)) as well as the safe to distribute MATLAB source code files and compile compiler.build.standaloneApplication(‘MATLAB_SOURCE_CODE_FILE_Y.m’).
When I run the standalone app, some of the functions from the pcode will yield Undefined function ‘Some_Function’ for input arguments of type ‘char’. Error in PCODE_FILE_X Error in MATLAB_SOURCE_CODE_FILE_Y (line 85) despite the fact that Some_Function has a corresponding pcode file in the pcode folder.
I tried listing at the bottom of the main function for the standalone app all the pcode files as other threads suggest but that doesn’t solve the problem for pcode files referencing functions from other pcode files. Any ideas?I have a MATLAB standalone app compiled from many different source code files. Some of the dependencies for this app are sensitive IP so I identified all required files using requiredFilesAndProducts and I obfuscated those sensitive dependencies (since source code is to be delivered as part of this project). Some of those dependencies use functions from other dependencies so I recursively called requiredFilesAndProducts to get a complete list of all required files. From that list, I then ran pcode against the sensitive IP and gathered all the pcode files into one location.
When I compile the standalone executable, I add the path to the pcode folder addpath(genpath(‘C:pathtopcodefolder’)) as well as the safe to distribute MATLAB source code files and compile compiler.build.standaloneApplication(‘MATLAB_SOURCE_CODE_FILE_Y.m’).
When I run the standalone app, some of the functions from the pcode will yield Undefined function ‘Some_Function’ for input arguments of type ‘char’. Error in PCODE_FILE_X Error in MATLAB_SOURCE_CODE_FILE_Y (line 85) despite the fact that Some_Function has a corresponding pcode file in the pcode folder.
I tried listing at the bottom of the main function for the standalone app all the pcode files as other threads suggest but that doesn’t solve the problem for pcode files referencing functions from other pcode files. Any ideas? I have a MATLAB standalone app compiled from many different source code files. Some of the dependencies for this app are sensitive IP so I identified all required files using requiredFilesAndProducts and I obfuscated those sensitive dependencies (since source code is to be delivered as part of this project). Some of those dependencies use functions from other dependencies so I recursively called requiredFilesAndProducts to get a complete list of all required files. From that list, I then ran pcode against the sensitive IP and gathered all the pcode files into one location.
When I compile the standalone executable, I add the path to the pcode folder addpath(genpath(‘C:pathtopcodefolder’)) as well as the safe to distribute MATLAB source code files and compile compiler.build.standaloneApplication(‘MATLAB_SOURCE_CODE_FILE_Y.m’).
When I run the standalone app, some of the functions from the pcode will yield Undefined function ‘Some_Function’ for input arguments of type ‘char’. Error in PCODE_FILE_X Error in MATLAB_SOURCE_CODE_FILE_Y (line 85) despite the fact that Some_Function has a corresponding pcode file in the pcode folder.
I tried listing at the bottom of the main function for the standalone app all the pcode files as other threads suggest but that doesn’t solve the problem for pcode files referencing functions from other pcode files. Any ideas? matlab compiler, pcode MATLAB Answers — New Questions