Pcode undefined for arguments of type 'char'. MATLAB Runtime is broken.

I have a compiled application that uses pcode() to obfuscate data. My code works fine when I run it from source but when I compile it and run it as an executable I get an error that says "Undefined function 'pcode' for input arguments of type 'char'.". Is there a work around to this or can MATLAB not run code that uses pcode.
If anyone can help me with this I would greatly appreciate this as it is time-sensitive. On a separate note if the MATLAB runtime is this unreliable someone should make that clear to people who try to compile code.

Answers (1)

According to this documentation page, calling the pcode function from within a standalone application generated by MATLAB Compiler is not supported. MATLAB has no problem calling the pcode function. Standalone applications can't call pcode.
If by "to obfuscate data" you mean you want to have your standalone application write a MATLAB script or function file that defines a variable containing your data, pcode that code, and call the generated P-files that's not going to work. From this documentation page: "The MATLAB Runtime only works on MATLAB code that was encrypted when the deployable archive was built. Any function or process that dynamically generates new MATLAB code will not work against the MATLAB Runtime."

Categories

Asked:

on 25 Jun 2018

Commented:

on 25 Jun 2018

Community Treasure Hunt

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

Start Hunting!