I attempted to export an Standalone FMU from Simulink environment, but encountered the following error: "[an installation of Microsoft Visual C++ 2017 cannot be detected]".
I tried installing Microsoft Visual C++ 2015-2020 package, restarted the PC, and retried, but encountered the same error. Installing C++ 2017 separately and retrying also resulted in the same error.
I even tried with a simple model (consisting of only one ramp block and one sum block), suspecting a Simulink model issue, but the error persisted.
I would like to inquire about possible solutions to this problem.
diagnosis viewer text :
Setting ExportedContent to 'off'. Option to export archived project is not supported if Generate32BitDLL is 'on'. Setting CreateModelAfterGeneratingFMU to 'off'. CreateModelAfterGeneratingFMU option is not supported if Generate32BitDLL is 'on'. 'GenCodeOnly' is disabled for Co-Simulation Standalone FMU Export. Setting System Target to FMU Co-Simulation for model 'ex_26_fchev_simulink'. Setting Hardware Implementation > Device Type to 'MATLAB Host' for model 'ex_26_fchev_simulink'. Generating 32-bit MSVC toolchain.
An installation of Microsoft Visual C++ 2017 cannot be detecte

답변 (1개)

Angelo Yeo
Angelo Yeo 2024년 6월 20일
편집: Angelo Yeo 2024년 6월 20일

0 개 추천

(1) What's your output when you run the command below? Can MATLAB detect Visual Studio C++ 2017 with the following command?
mex -setup cpp
(2) If MATLAB cannot detect Visual Studio 2017, please refer to the following Answers page for a official guideline for installation. Note that MATLAB/Simulink only support Community (free), Professional, and Enterprise edition of Visual Studio. (Express, Build Tools, and Preview editions are not supported.)

댓글 수: 4

Jae-Young Kim
Jae-Young Kim 2024년 6월 20일
Thanks for your answer.
But, I tried both of your answer, it doesn't work.
Angelo Yeo
Angelo Yeo 2024년 6월 20일
What's the output from the command I told you in (1)?
Jae-Young Kim
Jae-Young Kim 2024년 6월 21일
MinGW64 Compiler (C++)
MinGW64 Compiler with Windows 10 SDK or later (C++)
Microsoft Visual C++ 2022
I tried all of them. but, not working
Marcel Brito
Marcel Brito 2025년 7월 22일
@Angelo Yeo Why is there no solution to this? Why do I even have to use an outdated compiler although MSVC 2019 is out for years? I installed MSVC 2017 just for the FMU export and mex does not recognize it.

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

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2024년 6월 20일

댓글:

2025년 7월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by