- https://www.mathworks.com/help/matlab/ref/mex.html
- https://www.mathworks.com/help/matlab/ref/pwd.html
Iam facing Below Issues While Compelling the model in Matlab 2021rb
22 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (2 件)
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!
0 件のコメント
Bruno Luong
2024 年 10 月 22 日 10:17
-I"D:\Users\Sumanth\OCTOBER\ CFLAGS="$CFLAGS -w "
It seems the second double quotes are wrongly placed
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Environment Customization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!