Why do I get the error "Invalid Path" when simulating a GPU accelerated model?

I am following the instructions on the following page to create a GPU-accelerated model:
When I try to simulate the model, I get the following error message:
Making simulation target "edgeDetection_sfun", ...
### Linking ... "C:\Program Files\MATLAB\R2020b\bin\win64\mex.exe"
-R2018a -f
"C:\Users\User\AppData\Roaming\MathWorks\MATLAB\R2020b\mex_C++_win64.xml"
-silent LDFLAGS="$LDFLAGS -Xlinker " " " -output
edgeDetection_sfun.mexw64 @edgeDetection_sfun.mol
Invalid path
gmake: *** [edgeDetection_sfun.mexw64] Error -1
Component:Make | Category:Make error
Unable to create mex function 'edgeDetection_sfun.mexw64' required for
simulation.
Component:Simulink | Category:Model error

 採用された回答

MathWorks Support Team
MathWorks Support Team 2020 年 11 月 30 日
It looks you might be using the MinGW compiler. GPU Coder currently supports only Microsoft Visual C++ 2015, 2017, and 2019, as indicated on the following Documentation page:
You can check which C++ compiler is selected by using the 'mex' command. Please run the following command in the MATLAB command window:
>> mex -setup -lang c++
If MinGW is selected, then you should be able to click on an appropriate link in the command window to select Visual Studio instead (assuming Visual Studio is installed on your machine). 

その他の回答 (0 件)

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by