Why could I specify a file path and file name for the logfile in Matlab Compiler 2012b but I can only specify the file name in 2016a?

Under the Matlab Compiler 2012b Advanced setting tab, I could specify a file path and file name for a log file. Now, in Matlab Compiler 2016a, I can only specify the file name for the logfile because \ is one of the invalid characters. Is there a way to specify a file path for my log file?

Réponses (2)

In step 6 described in the below link to create a standalone application with MATLAB Compiler, when you click package button, you will be prompted to browse the location where you want the compiled application to be placed. All the files including log files that get generated with the compiler gets placed in this location.
https://www.mathworks.com/help/compiler/create-and-install-a-standalone-application-from-matlab-code.html

3 commentaires

In 2012b, I could specify a log file as C:\Temp\series_log in the Project Settings under the Advanced tab, MCR Startup Options, Create log file.
In 2016a, I can only specify the name of the log file, series_log, but not the file path in the Matlab Compiler app under the Additional runtime settings, Create log file.
I'm placing the standalone application on the company network drive. I want the log files stored in the users C:\Temp folder. With 2016a, the log file is in the same folder on the company network as the .exe file. I don't want the log file on the network because there could be more than one user at a time running the .exe file. I use the log file as a debugging tool to assist when end users experience issues. If an end user has issues, I don't want the log file overwritten by a different end user.
In MS Windows, you can use / instead of \
Both \ and / are included in the list of invalid characters.

Connectez-vous pour commenter.

Unsure if you're still after an answer, but I found this solution which uses the syntax
mcc -e -R -logfile -R 'filename.txt' -v function_name
You can then specify the direcotory within the 'filename.txt'. This is for 2019b btw.

Catégories

En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by