Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compiling Error] The compiler feature "cxx_std_23" is not known to CXX compiler #191

Closed
nosmirck opened this issue Sep 26, 2022 · 5 comments

Comments

@nosmirck
Copy link

Brand new project, added the package and sample.

This is the output when I try flutter run

Launching lib\main.dart on Windows in debug mode...
lib\main.dart:1
CMake Error at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:77 (target_compile_features):
  target_compile_features The compiler feature "cxx_std_23" is not known to
  CXX compiler

  "MSVC"

  version 19.29.30140.0.


Exception: Unable to generate build files
Exited (sigterm)

This package used to work before 0.2.2

The Readme says that a new sdk for windows 11 is required, I downloaded the SDK installer from here https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ and installed in my machine successfully. I rebooted, did a flutter clean and pub get, tried flutter run again, same error.

This is my output for flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.2, on Microsoft Windows [Version 10.0.19044.2006], locale en-CA)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)  
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Professional 2019 16.11.10)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.71.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

If I rollback to fixed version "0.2.1" it works again.

Any help? Thanks!

@jnschulze
Copy link
Owner

Hi,
this check

if (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30129 AND CMAKE_VERSION VERSION_GREATER 3.20.3)
seems to be wrong and doesn’t play well with your Visual Studio and CMake version combination. Are you on the latest Visual Studio 2019 version?
What‘s your CMake version?

see

@intaekim-gea
Copy link

intaekim-gea commented Sep 29, 2022

I have the same issue and my Visual Studio is the latest 2019.
The problem is that the "CMake" version is 3.20.21032501-MSVC_2 and it is recognized as 3.20.3 or higher.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cmake --version
cmake version 3.20.21032501-MSVC_2

So, the package's minimum requirement has been changed to Visual Studio 2022.
I'll solve this by upgrading IDE.

@tuantiensiu
Copy link

I have the same issue and my Visual Studio is the latest 2019
Can you tell me what version you are using in project?

Flutter version

[√] Flutter (Channel stable, 3.3.1, on Microsoft Windows [Version 10.0.22000.675], locale en-US)
    • Flutter version 3.3.1 on channel stable at D:\Projects\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4f9d92fbbd (5 weeks ago), 2022-09-06 17:54:53 -0700
    • Engine revision 3efdf03e73
    • Dart version 2.18.0
    • DevTools version 2.15.0

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.11.20)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
    • Visual Studio Enterprise 2019 version 16.11.32929.386
    • Windows 10 SDK version 10.0.19041.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.675]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 106.0.5249.103
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 105.0.1343.33

[√] HTTP Host Availability
    • All required HTTP hosts are available

cmake --version

cmake version 3.24.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

@d3roch4
Copy link

d3roch4 commented Nov 2, 2022

Downgrade to 0.2.1 work to me, tanks!

@jnschulze
Copy link
Owner

See #208 (comment)

@jnschulze jnschulze closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants