필터 지우기
필터 지우기

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

조회 수: 16 (최근 30일)
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)'?

채택된 답변

Jesse Hopkins
Jesse Hopkins 2019년 5월 1일
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
Jesse Hopkins
Jesse Hopkins 2020년 2월 18일
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?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by