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

22 ビュー (過去 30 日間)
VEERENDRA KUDUPUDI
VEERENDRA KUDUPUDI 2024 年 10 月 22 日 9:02
回答済み: Bruno Luong 2024 年 10 月 22 日 10:17
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

回答 (2 件)

Sahas
Sahas 2024 年 10 月 22 日 10:07
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 2024 年 10 月 22 日 10:17
-I"D:\Users\Sumanth\OCTOBER\ CFLAGS="$CFLAGS -w "
It seems the second double quotes are wrongly placed

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by