フィルターのクリア

Not able to use MINGW compiler for C++

11 ビュー (過去 30 日間)
Gagan  Dabole
Gagan Dabole 2021 年 10 月 18 日
回答済み: David Fink 2021 年 10 月 21 日
Hi, I am trying to run this example file (https://de.mathworks.com/help/coder/ug/generate-cpp-classes-for-matlab-classes-that-model-simple-and-damped-oscillators.html) on my PC with Matlab 2021b and I get the following error message even though I have installed the MinGW C/C++ compiler. I have tried to resolve this but was not successful. Please help me.
  2 件のコメント
Ji Lee
Ji Lee 2021 年 10 月 18 日
編集済み: Ji Lee 2021 年 10 月 18 日
What was the command that you executed to elicit that error? That error seems to indicate that you were directly calling the "mex" function whereas the MATLAB Coder example you mentioned utilizes the "codegen" function that comes with MATLAB Coder. If that example errors, what does it say?
Gagan  Dabole
Gagan Dabole 2021 年 10 月 20 日
Hi, thank you for your answer. The problem was on my side. C++ compiler was not correctly installed on my PC. I uninstalled Visual Studio and installed the compilers again. It worked! Thanks again.

サインインしてコメントする。

回答 (1 件)

David Fink
David Fink 2021 年 10 月 21 日
As Gagan figured out, the Visual Studio compiler was not correctly installed, and uninstalling + reinstalling it allowed MATLAB to find it.
For reference, here is the page describing how to change MATLAB's default compiler:

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by