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.

回答 (1 件)

Steven Lord
Steven Lord 2018 年 6 月 25 日

0 投票

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."

1 件のコメント

Jacob Mevorach
Jacob Mevorach 2018 年 6 月 25 日
That's disappointing. Thanks for the quick response however.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB Compiler SDK についてさらに検索

質問済み:

2018 年 6 月 25 日

コメント済み:

2018 年 6 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by