Changable files in matlab compiled executable

Hello,
I would like to keep an API function as .mexw64-file outside of my Matlab compiled executable, e.g. for the use with different hardware or to later update the API without the need of redeployment. Therefore, I would like to have these API files to be not included in the list "files required for your application to run" of the Matlab Compiler, but in a subfolder of "files installed for your end user". However, since the files/functions are linked in my Matlab code, they are always added in the required list and deployed and thus later not changable.
Has anyone an idea how I could implement a solution? I would really appreciate your help.

回答 (1 件)

Kojiro Saito
Kojiro Saito 2018 年 10 月 24 日

0 投票

How about the following steps?
  • Move the mexw64-file to outside of the current folder (where m file is located)
  • Compile the m file
  • Move the mexw64-file to the current folder of compiled exe

4 件のコメント

Raimund Kaiser
Raimund Kaiser 2018 年 10 月 24 日
Hello Saito-san,
thank you very much for your answer. The mexw64-file is outside of the project/.m file folder (but on the Matlab) path. When I press "package", the .mexw64 file is automatically added to the list of "files required...". Interestingly, it even adds the mewx64-file, when its folder is removed from the Matlab path, which is kind of hard for me to understand.
Kojiro Saito
Kojiro Saito 2018 年 10 月 24 日
編集済み: Kojiro Saito 2018 年 10 月 24 日
After moving the mex64-file to outside MATLAB path, did you compile m file again from scratch? i.e., Open Application Compiler, add the m file to exported functions. Not from exisiting .prj file.
Raimund Kaiser
Raimund Kaiser 2018 年 10 月 24 日
You are right, I reused the project-file. I just checked it with a dummy function and it seems like the combination of a new compiler project and API-files outside of the Matlab path works. Thanks a lot. I'm now going to confirm it with the real function.
Raimund Kaiser
Raimund Kaiser 2018 年 10 月 26 日
Hi, the compiling worked, but if I move the mexw to the deployed folder , it either does not find it or in another folder the error message is coming that an "auth file is missing". Does the path of installation need to be added via "addpath" to the Matlab path or should I try something else?

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

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

リリース

R2017b

質問済み:

2018 年 10 月 24 日

コメント済み:

2018 年 10 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by