I have trouble building Solution in MSVC for simulink model to generate execuatble

3 ビュー (過去 30 日間)
Maria
Maria 2024 年 6 月 27 日
回答済み: Anshuman 2024 年 9 月 10 日
Once the solution file is created, it throws an error in VS 2019 :
fatal error C1083: Cannot open include file: 'nuttx/config.h': No such file or directory
I use VS 2019 with platform toolset v 142 with matlab 2021a.
Thanks,
Maria

回答 (1 件)

Anshuman
Anshuman 2024 年 9 月 10 日
Hello,
The error you're encountering indicates that the build process is unable to locate the 'nuttx/config.h' file, which is required for compilation. Here are some steps you can take to resolve this issue:
  • Ensure that the directory containing 'nuttx/config.h' is included in the project's include paths.
  • In Visual Studio, right-click on your project in the Solution Explorer, select "Properties," and navigate to "C/C++" -> "General" -> "Additional Include Directories." Add the path where "nuttx/config.h" resides.
  • Ensure that MATLAB is properly configured to work with your version of Visual Studio. You can verify this by running the following command in MATLAB:
mex -setup
% This command will guide you through configuring the compiler settings.
  • Check if there are any environment variables that need to be set for NuttX or your project. Variables such as INCLUDE or PATH might need to be updated.
  • After making the necessary changes, try cleaning and rebuilding the project in Visual Studio. You can do this by selecting "Build" -> "Clean Solution" followed by "Build" -> "Rebuild Solution."
You can refer to these documentation links:
Hope it helps!

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by