Error when using breakpoints in Simulink

1 view (last 30 days)
Im getting the following Error Message:
Making simulation target "OptimizeTrajectory_sfun", ...
"E:\Program Files\MATLAB\R2016b\bin\win64\mex.exe" -c -DMATLAB_MEX_FILE -I"E:\Program Files\MATLAB\R2016b\extern\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include\sf_runtime" -I"E:\Program Files\MATLAB\R2016b\stateflow\c\mex\include" -I"E:\Program Files\MATLAB\R2016b\rtw\c\src" -I"E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src" OptimizeTrajectory_sfun.c
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
"E:\Program Files\MATLAB\R2016b\bin\win64\mex.exe" -c -DMATLAB_MEX_FILE -I"E:\Program Files\MATLAB\R2016b\extern\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include\sf_runtime" -I"E:\Program Files\MATLAB\R2016b\stateflow\c\mex\include" -I"E:\Program Files\MATLAB\R2016b\rtw\c\src" -I"E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src" OptimizeTrajectory_sfun_registry.c
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
"E:\Program Files\MATLAB\R2016b\bin\win64\mex.exe" -c -DMATLAB_MEX_FILE -I"E:\Program Files\MATLAB\R2016b\extern\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include" -I"E:\Program Files\MATLAB\R2016b\simulink\include\sf_runtime" -I"E:\Program Files\MATLAB\R2016b\stateflow\c\mex\include" -I"E:\Program Files\MATLAB\R2016b\rtw\c\src" -I"E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src" c3_OptimizeTrajectory.c
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
### Linking ...
"E:\Program Files\MATLAB\R2016b\bin\win64\mex.exe" -silent LDFLAGS="$LDFLAGS " -output OptimizeTrajectory_sfun.mexw64 @OptimizeTrajectory_sfun.mol
E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src\Files\MATLAB\R2016b\extern\lib\win64\mingw64 not found; check that you are in the correct current folder, and check the spelling of 'E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src\Files\MATLAB\R2016b\extern\lib\win64\mingw64'.
gmake: *** [OptimizeTrajectory_sfun.mexw64] Error -1
With "E:\GIT IRT\work\" being my working folder, I think that the error is that matlab is trying to find the folder of MinGW somewhere in my working folder.
Matlab is trying the path "E:\GIT IRT\work\slprj\_sfprj\OptimizeTrajectory\_self\sfun\src\Files\MATLAB\R2016b\extern\lib\win64\mingw64" which is not existing.
MinGW is under MatlabRoot\extern\lib\win64\mingw64, which is similar to the wrong path.
I have no idea how to fix this problem. I'm grateful for ideas.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 8 Jan 2020
Can you run "mex -setup" and follow instructions to select your local MinGW as the C compiler.
  2 Comments
Christopher Schulte
Christopher Schulte on 8 Jan 2020
Hello, thanks for your answer.
If I type in "mex -setup", It states that a MinGW compiler (C) is present. Additionally the compiler was In the first lines of the error successful.
Fangjun Jiang
Fangjun Jiang on 8 Jan 2020
Right. Try removing the folder \slprj in your working folder and re-run. It is a temporary folder, safe to remove.

Sign in to comment.

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!