GCC Error When Compiling S-Function

16 visualizzazioni (ultimi 30 giorni)
Gourav
Gourav il 28 Lug 2024
Modificato: David il 18 Gen 2025 alle 10:02
I am attempting to compile an S-Function using the "mex" command in MATLAB. However, I encounter the following errors during the compilation process: GCC error create process: no such file or directory.
Can anybody help me resolve the issue ?

Risposte (1)

Shreshth
Shreshth il 16 Gen 2025
Hi Gourav,
The error message generated by the gcc compiler suggests that the "gcc" is unable to find the file which have to be compiled.
This can be possible due to two reasons:
1- The path of the file which have to be compiled by the "mex" command is incorrect so "gcc" is unable to find the file.
2- The permission to access the file or the directory is not available or provided to the "gcc", so it is unable to compile the file.
To verify whether there is issue with the permissions, please execute the below command in the MATLAB Command Window:
cd(matlabroot)
cd extern/examples/mex
mex yprime.c -v
The output of the above command will provide information if there are any issues with permission or not, by showing error such as:
Error using mex
Access denied; check that you have permissions to access 'C:\Program Files\MATLAB\R2017b\extern\examples\mex'.
If there is any permission or access issue, then the solution is to have the admin access to the file or directory or install the MATLAB release in another location where the permission access is available.
Hope it helps.
  1 Commento
David
David il 17 Gen 2025 alle 20:57
Modificato: David il 18 Gen 2025 alle 10:02
Thank You.
The problem is "..permissions to access..." I 'am admin on my PC.
I did: I came to C:\Program Files\MATLAB at Property -> Security -> Edit, make Allow to everything and everybody. Push Ok and wait 10 min. it works, until I make any change. After every change, Every time i want it to Run , i need to run a command before: cd(matlabroot) cd extern/examples/mex mex yprime.c -v.
I don't know what to do.

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Tag

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by