Codegen Fails Without Showing any Errors

Matlab 2022a:
The Matlab Coder Report Viewer indicated that I have a build error:
"Build error: C++ compiler produced errors. See the Build Log for further details.More Info"
But when I view the Build Logs it doesn't contain any errors. It just ends like this:
...
[18/260] cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs ... \fuelopt_nlp.obj
fuelopt_nlp.cpp
ninja: build stopped: subcommand failed.
My only guess is that the build ninja is preventing the error message from being displayed. Is there a way to get verbose build logs or disable the ninja?

3 件のコメント

Raghu Boggavarapu
Raghu Boggavarapu 2022 年 8 月 22 日
編集済み: Raghu Boggavarapu 2022 年 8 月 22 日
Could you please let us know if you are able to build portable code (library/dll) ?
If you are using "codegen" then you can create the configuration using coder.config('lib') / coder.config('dll')
Burnham Stokes
Burnham Stokes 2022 年 8 月 23 日
編集済み: Burnham Stokes 2022 年 8 月 23 日
Using coder.config('lib') I was able to get a build log showing the errors. However these errors are a result of not building for MEX because of MEX-specific compiler flag MATLAB_MEX_FILE I use in my project. It's not clear to me how I would add that compiler flag to the coder configuration.
Raghu Boggavarapu
Raghu Boggavarapu 2022 年 8 月 25 日
You can use coder.updateBuildInfo to add additional flags to target compiler: Update build information object RTW.BuildInfo - MATLAB coder.updateBuildInfo - MathWorks India

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeBuild Configuration についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 8 月 19 日

コメント済み:

2022 年 8 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by