commit | 847deb2089a383656c7799331ccb6617db6f43e1 | [log] [tgz] |
---|---|---|
author | Bryan Oltman <bryanoltman@gmail.com> | Wed Dec 11 20:23:11 2024 -0500 |
committer | GitHub <noreply@github.com> | Wed Dec 11 17:23:11 2024 -0800 |
tree | a5394ec61aa882b4d2954642121837d7e426eaf5 | |
parent | d7d3fa7d0d40956baee72bc8544483175b489c33 [diff] |
Cast ::GetLastError to int (#57113) `GetLastError` returns an unsigned 32 bit integer that was being implicitly cast to an int for the std::variant<..., int>. This was causing my build to fail with: ``` ../../flutter/shell/platform/windows/platform_handler.cc(178,12): error: no viable conversion from returned value of type 'DWORD' (aka 'unsigned long') to function return type 'std::variant<std::wstring, int>' (aka 'variant<basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>>, int>') 178 | return ::GetLastError(); | ^~~~~~~~~~~~~~~~ ../../../../../../../Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/include\variant(923,7): note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'DWORD' (aka 'unsigned long') to 'const variant<basic_string<wchar_t>, int> &' for 1st argument 923 | class variant : private _SMF_control<_Variant_destroy_layer<_Types...>, _Types...> { // discriminated union | ^~~~~~~ ``` Commands: ``` ./flutter/tools/gn --runtime-mode release --no-rbe ninja -C .\out\host_release windows gen_snapshot flutter/build/archives:windows_flutter ``` Explicitly casting `::GetLastError` to an int fixes this issue. I'm running on Windows 11 (Version 10.0.26100 Build 26100) with VS 2022 Community Edition. @loic-sharma Co-authored-by: Eric Seidel <eric@shorebird.dev>
Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.
If you want to run/contribute to Flutter Web engine, more tooling can be found at felt. This is a tool written to make web engine development experience easy.
If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at Flutter.dev. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.dev.
Flutter is a fully open source project, and we welcome contributions. Information on how to get started can be found at our contributor guide.