2

I am getting this error while running the flutter application targeting windows. The project is running on android and the web.

CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found.

Exception: Unable to generate build files And in the console

flutter doctor -v After running flutter doctor,

C:\Users\ibrahim42386>flutter doctor -v
[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22616.100], locale en-US)
• Flutter version 3.3.4 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision eb6d86ee27 (6 days ago), 2022-10-04 22:31:45 -0700
• Engine revision c08d7d5efc
• Dart version 2.18.2
• DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\ibrahim42386\AppData\Local\Android\Sdk
• Platform android-32, build-tools 31.0.0
• ANDROID_HOME = C:\Users\ibrahim42386\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Users\ibrahim42386\AppData\Local\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.3.32922.545
• Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
   https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
   https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] VS Code (version 1.71.2)
• VS Code at C:\Users\ibrahim42386\AppData\Local\Programs\Microsoft 
VS Code
• Flutter extension version 3.50.0

[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22616.100]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 91.0.4472.77
• Edge (web)        • edge    • web-javascript • Microsoft Edge 105.0.1343.33
[√] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

What should I do to run this project on windows?

Ibrahim Tinku
  • 141
  • 1
  • 1
  • 10
  • 1
    "... running the flutter application targeting windows" - I am not an expert in Flutter, but I guess a Windows-targeting build uses Visual Studio as [CMake generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html). If my guess is correct, then make sure that you have checked [that question](https://stackoverflow.com/questions/31619296/cmake-does-not-find-visual-c-compiler) about the same error message and enabled all settings noted in its answers. – Tsyvarev Oct 11 '22 at 10:43

0 Answers0