Iam facing Below Issues While Compelling the model in Matlab 2021rb

2 visualizzazioni (ultimi 30 giorni)
Error(s) encountered while building simulation target MEX-file for model 'APItest'.
Caused by: "C:\Program Files\MATLAB\R2021b\bin\win64\mex.exe" -R2018a -c -DMATLAB_MEX_FILE -I"D:\Users\Sumanth\OCTOBER\ -I"C:\Program Files\MATLAB\R2021b\extern\include" -I"C:\Program Files\MATLAB\R2021b\simulink\include" -I"C:\Program Files\MATLAB\R2021b\rtw\c\src" -I"D:\Users\Sumanth\OCTOBER\ CFLAGS="$CFLAGS -w " APItest_cgxe.c D:\Users\Sumanth\OCTOBER\#br_498475_ASW_TAG_9_00\src\Model_dev\moncdd\Mdl\slprj\_cgxe\APItest\src\Files\MATLAB\R2021b\extern\include -IC:\Program not detected; check that you are in the correct current folder, and check the spelling of 'D:\Users\Sumanth\OCTOBER\#br_498475_ASW_TAG_9_00\src\Model_dev\moncdd\Mdl\slprj\_cgxe\APItest\src\Files\MATLAB\R2021b\extern\include -IC:\Program'. gmake: *** [APItest_cgxe.obj] Error -1

Risposte (2)

Sahas
Sahas il 22 Ott 2024
Hi,
As per my understanding, you are trying to generate a simulation target MEX file for a Simulink model "APItest". From the error text provided, it looks like Simulink is not able to read the path of the files due to white spaces or special characters in file name and file path.
I recommend wrapping all the file paths that contain folders and file names with white spaces and special characters in single quotes or renaming such folders and file names so that they don't contain any white spaces or special characters.
Alternatively, you can use MATLAB's "pwd" function to get the present working directory and -I argument to include the file. Refer to the following MathWorks documentation links for steps to specifying the path to include the file and using the "pwd" function:
Also, check out the MATLAB Answer below which resolves the issue of adding libraries in file paths while running the MEX command:
I hope this is beneficial!

Bruno Luong
Bruno Luong il 22 Ott 2024
-I"D:\Users\Sumanth\OCTOBER\ CFLAGS="$CFLAGS -w "
It seems the second double quotes are wrongly placed

Categorie

Scopri di più su Simulink Environment Customization in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by