Unable to open custom file while building model in Linux

2 visualizaciones (últimos 30 días)
Shardul Kulkarni
Shardul Kulkarni el 21 de Mayo de 2024
Respondida: Dhruv el 28 de Mayo de 2024
I'm trying to build a model in Linux environment. But it throws error as unable to open source file. This error is for a custom header file, which is verified to be present in the path (not current path).
I have tried to build the same model in Windows environment, where is builds without any issues.
Does anyone have solution to this problem? Thanks in advance.
P.S. I'm using MATLAB R2022b.

Respuestas (1)

Dhruv
Dhruv el 28 de Mayo de 2024
Hi Shardul,
To help resolve the issue, here are some steps which you can follow that might help you:
  • Check for Case Sensitivity: Linux filesystems are case-sensitive, unlike Windows. Ensure the case of your file path and the file name in your MATLAB code exactly match the actual path and file name.
  • Check File Permissions: Ensure that the file permissions on the custom header file and its directory allow MATLAB to read them. You can check the permissions using the ‘ls -l’ command in the terminal and modify them using the ‘chmod’ command if necessary.
  • MATLAB Preferences and Cache: Sometimes, MATLAB's internal preferences or cache can cause issues. Try clearing MATLAB's cache and resetting preferences to see if this resolves the issue. Refer to the following documentation to get more information: https://www.mathworks.com/help/matlab/ref/rehash.html
  • Update MATLAB Path: Ensure that MATLAB's internal path (not the system $PATH variable) includes the directory containing your header file. You can add paths to MATLAB's search path using the ‘addpath’ function. The following link will help guide you with the same: https://www.mathworks.com/help/matlab/ref/addpath.html
However, if you are still encountering issues, you may reach out to MathWorks Technical Support as they will assist you further.
Hope this helps!

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by