Simulink Accelerator Mode is using the wrong compiler and won't build

14 views (last 30 days)
I am attempting to run a set of simuilnk models using model references. I have both MinGW and Visual Studio installed, and switch between them regularly using mex -setup. I typically leave the Simulink model configset 'Toolchain' parameter at 'Auto', which has worked for many years.
However, my current model ALWAYS seems to want to use visual studio to compile the top-level model accelerator target, even when mex -setup is set to MinGW (both C and C++), and I've even manually set the 'Toolchain' parameter to 'MinGW64 | gmake (64-bit Windows)'!
Curiosly, the referenced models (which are sharing the same referenced config set) ARE built with the MinGW toolchain, but when the top-level accelerator target is attempted to update, it bombs out with the message:
The model 'FSIM_FsimTestModel' is configured to use the compiler 'Microsoft Visual C++ 2015 (C):TMF', however the referenced model 'FSIM_FsimTestModel_referenced' was built with 'MinGW64 Compiler (C):Toochain' which is not compatible for a model reference hierarchy build. Consider configuring all models to use the same compiler. The Build Process will terminate.
The message politely suggests to "Consider configuring all models to use the same compiler", but I've exhausted all of my knowledge of how to accomplish this? Any thoughts?
Why is the top level model claiming to be congifured for Visual Studio when it's 'Toolchain' parameter is explicitly set to 'MinGW64 | gmake (64-bit Windows)'?

Accepted Answer

Jesse Hopkins
Jesse Hopkins on 1 May 2019
Well I did eventually get past this. I started a clean-slate new model file and copied the contents of the original model into it.
  1 Comment
Jesse Hopkins
Jesse Hopkins on 18 Feb 2020
A bit more info here. Turns out the culprit here was the 'AccelVerboseBuild' setting. While this setting was enabled, the model would always use visual studio to build the top-level model. While this setting was disabled, the model would use the currently configured compiler to build the top-level model.
So I guess that means it is not possible for me to get a verbose build output from MinGW if Visual Studio is installed on my machine?

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!