Opening "external" files in a compiled Mac program
2 ビュー (過去 30 日間)
古いコメントを表示
Hello
I have a program that has a button to open an external .pdf file.
when I run via Matlab, I have the button call this code
system([sprintf('open %s',path)]);
where path is the name of the file to be opened, and this works fine.
I then compiled the program on Mac, and included the external files within the compiled executable.
However, when I run the program, nothing happens when I click the button
Can you help explain why this happens and how I can fix it? Do I somehow need to call the files differently if they reside within the compiled executable?
thanks!
1 件のコメント
Anton Kogios
2024 年 2 月 6 日
Not too sure if this will work, but you may need to allow (full) disk access to the executable in System Preferences.
採用された回答
Image Analyst
2024 年 2 月 7 日
2 件のコメント
Image Analyst
2024 年 3 月 21 日
Do not call your variable path since that is the name of a built-in variable.
See attached function that may be helpful to you.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!