- 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!