singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.59k stars 837 forks source link

[Desktop] Windows Build Error #1493

Closed molihuan closed 1 year ago

molihuan commented 1 year ago

My issue is about [Desktop] Windows I pulled this project locally and ran it without modifying anything. There was no problem running it on Android, but there was an error running on Windows 10 and it couldn't run. Is this library no longer supporting Windows, is my network not working (in China), is there a local cache issue, or is there a bug in the project.

Version: 8.1.1

Flutter:3.13.7

Main error log: [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(983,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [C:\Users\moli\Flutter\flutter-quill-master\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1004,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [C:\Users\moli\Flutter\flutter-quill-master\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1038,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [C:\Users\moli\Flutter\flutter-quill-master\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1057,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [C:\Users\moli\Flutter\flutter-quill-master\example\build\windows\plugins\gal\gal_plugin.vcxproj] [{"event":"app.progress","params":{"appId":"93a0b34e-0312-4ece-8044-242bbd99e1c4","id":"0","progressId":null,"finished":true}}] [+3512 ms] Exception: Build process failed. [ +2 ms]

0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)

       #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:662:9)
       <asynchronous suspension>
       #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
       <asynchronous suspension>
       #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
       <asynchronous suspension>
       #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
       <asynchronous suspension>
       #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
       <asynchronous suspension>
       #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
       <asynchronous suspension>
       #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #10     main (package:flutter_tools/executable.dart:90:3)
       <asynchronous suspension>

image

molihuan commented 1 year ago

What should I do? Thank you

EchoEllet commented 1 year ago

What should I do? Thank you

Hi, please send us the versions you are using for flutter_quill and flutter_qull_extensions

also you should read this instructions for gal plugin in Windows setup

personally I haven't test it on Windows yet but I will be soon, Thank you for the report!

molihuan commented 1 year ago

What should I do? Thank you

Hi, please send us the versions you are using for flutter_quill and flutter_qull_extensions

also you should read this instructions for gal plugin in Windows setup

personally I haven't test it on Windows yet but I will be soon, Thank you for the report!

flutter_quill version: 8.1.1

flutter_quill_extensions version: 0.5.1

windows msg: Version Windows 10 Professional Version number 21H1 Installation date March 9, 2022 Operating system internal version 19043.1586 Experience Windows Feature Experience Pack 120.2212.4170.0

Reproduction steps:I can download the latest version directly using 'git clone...', which allows me to compile and run the Android version, but I cannot build and compile the Windows version. I don't know if it's just me

additional information:Do Gal plugins still need to be installed separately? I'm not sure

Flutter and Dart information: [!] Flutter (Channel stable, 3.13.7, on Microsoft Windows [版本 10.0.19043.1586], locale zh-CN) ! Warning: flutter on your path resolves to E:\DesktopSpace\Development\Environment\FlutterSDK\cache\3.13.7\bin\flutter, which is not inside your current Flutter SDK checkout at C:\Users\moli\fvm\default. Consider adding C:\Users\moli\fvm\default\bin to the front of your path. ! Warning: dart on your path resolves to E:\DesktopSpace\Development\Environment\FlutterSDK\cache\3.13.7\bin\dart, which is not inside your current Flutter SDK checkout at C:\Users\moli\fvm\default. Consider adding C:\Users\moli\fvm\default\bin to the front of your path. [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Professional 2019 16.11.24) [√] Android Studio (version 2022.3) [√] Connected device (3 available)

Flutter 3.13.7 • channel stable • https://github.com/flutter/flutter.git Framework • revision 2f708eb839 (3 weeks ago) • 2023-10-09 09:58:08 -0500 Engine • revision a794cf2681 Tools • Dart 3.1.3 • DevTools 2.25.0

Thank you.

EchoEllet commented 1 year ago

flutter_quill

I'm late but can you use the latest version of flutter_quill and the latest pre-release version of flutter_quill_extensions and tell me if the issue is still there??

molihuan commented 1 year ago

I'm late but can you use the latest version of flutter_quill and the latest pre-release version of flutter_quill_extensions and tell me if the issue is still there??

I'll give it a try. Thank you very much

molihuan commented 1 year ago

flutter_quill

I'm late but can you use the latest version of flutter_quill and the latest pre-release version of flutter_quill_extensions and tell me if the issue is still there??

Still unable to compile through build

Demo Video:

https://github.com/singerdmx/flutter-quill/assets/78474077/4b6d237b-4588-4875-9efe-1e4c0508db0f

molihuan commented 1 year ago

flutter_quill

I'm late but can you use the latest version of flutter_quill and the latest pre-release version of flutter_quill_extensions and tell me if the issue is still there??

I haven't changed anything and ran it directly, but I still can't compile it, but it can be compiled on Android.

molihuan commented 1 year ago

flutter_quill

I'm late but can you use the latest version of flutter_quill and the latest pre-release version of flutter_quill_extensions and tell me if the issue is still there??

It should be a gal plugin issue

'''

[ +26 ms] CustomBuild: [ ] Building Custom Rule E:/DesktopSpace/Development/Flutter/flutter-quill/example/windows/flutter/ephemeral/.plugin_symlinks/gal/windows/CMakeLists.txt [ +62 ms] ClCompile: [ ] E:\DesktopSpace\Development\Environment\vs2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /I"E:\DesktopSpace\Development\Flutter\flutter-quill\example\windows\flutter\ephemeral" /I"E:\DesktopSpace\Development\Flutter\flutter-quill\example\windows\flutter\ephemeral\cpp_client_wrapper\include" /Zi /nologo /W4 /WX /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D FLUTTER_PLUGIN_IMPL /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D gal_plugin_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++latest /Fo"gal_plugin.dir\Debug\" /Fd"gal_plugin.dir\Debug\vc142.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue /await "E:\DesktopSpace\Development\Flutter\flutter-quill\example\windows\flutter\ephemeral.plugin_symlinks\gal\windows\gal_plugin_c_api.cpp" "E:\DesktopSpace\Development\Flutter\flutter-quill\example\windows\flutter\ephemeral.plugin_symlinks\gal\windows\gal_plugin.cpp" [ +42 ms] gal_plugin_c_api.cpp [ +892 ms] gal_plugin.cpp [+1459 ms] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(983,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [E:\DesktopSpace\Development\Flutter\flutter-quill\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1004,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [E:\DesktopSpace\Development\Flutter\flutter-quill\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1038,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [E:\DesktopSpace\Development\Flutter\flutter-quill\example\build\windows\plugins\gal\gal_plugin.vcxproj] [ ] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt/impl/Windows.Foundation.0.h(1057,26): error C2039: "wait_for": ���� "winrt::impl" �ij�Ա [E:\DesktopSpace\Development\Flutter\flutter-quill\example\build\windows\plugins\gal\gal_plugin.vcxproj]

'''

molihuan commented 1 year ago

It's okay, this is a problem with the gal plugin. I downloaded the source code of the gal plugin and cannot compile it

EchoEllet commented 1 year ago

It's okay, this is a problem with the gal plugin. I downloaded the source code of the gal plugin and cannot compile it

I see, don't worry, I will try to make a fix soon.

molihuan commented 1 year ago

It's okay, this is a problem with the gal plugin. I downloaded the source code of the gal plugin and cannot compile it

I see, don't worry, I will try to make a fix soon.

Sorry, the gal plugin requires C++20, but my version is Visual Studio Professional 2019 version 16.11.33328.57, so it cannot be compiled due to my issue.

molihuan commented 1 year ago

It's okay, this is a problem with the gal plugin. I downloaded the source code of the gal plugin and cannot compile it

I see, don't worry, I will try to make a fix soon.

When I update VS to: [√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2022 17.1.3) • Visual Studio at E:\DesktopSpace\Development\Environment\vs2019\Enterprise • Visual Studio Enterprise 2022 version 17.1.32328.378 • Windows 10 SDK version 10.0.20348.0

There is no longer this issue, but a new one has emerged:

[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(149,10): error C2039: "thread": ���� "std" �ij�Ա [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]
[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(149,16): error C3861: ��thread��: �Ҳ�����ʶ�� [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]
[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(164,10): error C2039: "thread": ���� "std" �ij�Ա [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]
[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(164,16): error C3861: ��thread��: �Ҳ�����ʶ�� [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]
[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(173,10): error C2039: "thread": ���� "std" �ij�Ա [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]
[        ]   C:\Users\moli\Flutter\Note\note\windows\flutter\ephemeral\.plugin_symlinks\gal\windows\gal_plugin.cpp(173,16): error C3861: ��thread��: �Ҳ�����ʶ�� [C:\Users\moli\Flutter\Note\note\build\windows\plugins\gal\gal_plugin.vcxproj]

image

Add header file

#include<thread>

Only then can it compile normally

EchoEllet commented 1 year ago

Thank you for fixing the issue.

I just bumped the minimum of gal in flutter_quill_extensions so the issue now is fixed without having to add the dependency

if you have any other questions, feel free to ask us.

molihuan commented 1 year ago

Thank you for fixing the issue.

I just bumped the minimum of gal in flutter_quill_extensions so the issue now is fixed without having to add the dependency

if you have any other questions, feel free to ask us.

OK thanks

Aruljebaraj commented 3 months ago

any solution to this?

EchoEllet commented 2 months ago

any solution to this?

It was an issue of a plugin, and it has been solved. Can you open a new issue with the details if you're still facing this build failure?