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

Add Support for running Flutter on Windows ARM64 #53120

Closed
Tracked by #51
t0lah opened this issue Mar 23, 2020 · 50 comments
Closed
Tracked by #51

Add Support for running Flutter on Windows ARM64 #53120

t0lah opened this issue Mar 23, 2020 · 50 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter customer: crowd Affects or could affect many people, though not necessarily a specific customer. engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-host-arm Building on an ARM-based platform platform-windows Building on or for Windows specifically r: fixed Issue is closed as already fixed in a newer version team-engine Owned by Engine team tool Affects the "flutter" command-line tool. See also t: labels. triaged-engine Triaged by Engine team

Comments

@t0lah
Copy link

t0lah commented Mar 23, 2020

I'm new to flutter - and receive an error during installation:

The version of this file is not compatible with the version of Windows you're running.
What do I need to do?


Additional info on my computer setup:
Lenovo - 64bit Snapdragon - Win10 - newest version of flutter.


@rifqempul @Muhammad1122 I would like to provide you with more information, do you have questions? Many thanks. @TahaTesser Thanks! 👍

@t0lah
Copy link
Author

t0lah commented Mar 23, 2020

Here's a screenshot
(German, but maybe helpful)

image

@TahaTesser TahaTesser added tool Affects the "flutter" command-line tool. See also t: labels. platform-windows Building on or for Windows specifically documentation labels Mar 24, 2020
@t0lah
Copy link
Author

t0lah commented Mar 24, 2020

I'm reinstalling everything and try it again.

@kf6gpe
Copy link
Contributor

kf6gpe commented Mar 24, 2020

cc @csells. IIRC, we are not presently supporting this. We're looking at it for the roadmap, however.

@jmagman jmagman changed the title Flutter installation - wrong windows version? Windows 64bit Snapdragon not supported Mar 24, 2020
@jmagman jmagman added this to Awaiting triage in Tools - Windows review via automation Mar 24, 2020
@Sunbreak

This comment has been minimized.

@dnfield

This comment has been minimized.

@dnfield
Copy link
Contributor

dnfield commented Mar 25, 2020

We would need help from the Dart team on this, AFAIK Dart does not support Windows arm64. @rmacnak-google @a-siva or @mraleph would know better.

@dnfield dnfield added dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. labels Mar 25, 2020
@dnfield
Copy link
Contributor

dnfield commented Mar 25, 2020

Adding engine label because in the event that Dart can or will support this, the engine build rules and recipes would need to be updated to handle it.

@a-siva
Copy link
Contributor

a-siva commented Mar 25, 2020

Windows/ia32 and Windows/x64 are the two configurations we support the Dart SDK.

@dnfield
Copy link
Contributor

dnfield commented Mar 25, 2020

It might be possible to get it working with Linux arm64 using WSL somehow, but that's likely a pretty significant effort (and still requires us to build and ship binaries that we don't today).

@mraleph
Copy link
Member

mraleph commented Mar 25, 2020

Note that WSL has its own issues - and we don't actually test or support running Linux Dart SDK on WSL. There have been reports of pub hanging on WSL for example.

In general unless there is a very strong use case we would prefer to not expand Dart SDK to yet another platform - because it adds a lot of maintenance burden. We need waterfall builders for this, etc.

@stuartmorgan
Copy link
Contributor

Isn't the fact that mainstream ARM laptops running Windows 10 (one of the platforms Flutter supports) are being sold right now a strong use case? It's not like we're talking about legacy machines (like requests for 32-bit Windows as a development platform).

@dnfield
Copy link
Contributor

dnfield commented Mar 25, 2020

It'd probably be helpful if we had marketshare information on those. FWIW, this same issue will impact running Flutter applications on such machines.

I've also seen some articles suggesting Microsoft is working on having x64 emulation available on those machines, but that would obviously come with some performance penalty.

@a-siva
Copy link
Contributor

a-siva commented Mar 25, 2020

@stuartmorgan If the use case is percieved as strong a case has to be made at the product level for us to invest in adding this configuration to our mix and supporting it.

@Sunbreak
Copy link
Contributor

Sunbreak commented Mar 26, 2020

It'd probably be helpful if we had marketshare information on those. FWIW, this same issue will impact running Flutter applications on such machines.

I've also seen some articles suggesting Microsoft is working on having x64 emulation available on those machines, but that would obviously come with some performance penalty.

Here is a reference from Steam. Windows 10 on Arm is in Other

https://store.steampowered.com/hwsurvey?platform=pc

image

It's from a post on Reddit

https://www.reddit.com/r/windows/comments/57fse0/windows_32b_vs_64b_market_share_statistics/

And I quote

The steam survey is not relevant for me since its users are gaming focused and I am looking for a more general view.

@Sunbreak
Copy link
Contributor

@stuartmorgan If the use case is percieved as strong a case has to be made at the product level for us to invest in adding this configuration to our mix and supporting it.

Windows on Arm in 2020: An ecosystem finally worth buying into?

Bringing mobile chips to laptops is done in the name of portability, not peak performance. Windows 10 Arm devices won’t replace power-user workhorse laptops. Instead, they are built to offer long battery life so you don’t have to worry if you forget your charger, and 4G and 5G connectivity so you’re not stuck with Wi-Fi or tethering. Keeping that vision in mind, the Surface Pro X and Windows on Arm perform their jobs as advertised.

Probably, Windows 10 on Arm is neither suitable for gaming nor development

@stuartmorgan
Copy link
Contributor

Windows 10 on Arm is in Other

Source for that? How do you know it's not lumped into "Windows 10 64 bit" (given that it is both)?

I'm also not sure how useful market share numbers are for something that's relatively new. When Apple switched to Intel, market share numbers for users with Intel Apple machines were very low too; that's the nature of the introduction of anything new. Obviously that was a different case since it was an announced transition, but absent that level of clear signal all we know is that it's not many people yet,
not what it will look like in, say, a couple of years.

Probably, Windows 10 on Arm is neither suitable for gaming nor development

I'm not sure why you believe that Flutter development should be restricted to "power-user workhorse laptops".

I'm not saying that this is a major portion of the market right now, I'm saying that currently we aren't living up to our own described system requirements, nor do we know how much this segment may grow going forward.

@Sunbreak
Copy link
Contributor

Windows 10 on Arm is in Other

Source for that? How do you know it's not lumped into "Windows 10 64 bit" (given that it is both)?

I'm also not sure how useful market share numbers are for something that's relatively new. When Apple switched to Intel, market share numbers for users with Intel Apple machines were very low too; that's the nature of the introduction of anything new. Obviously that was a different case since it was an announced transition, but absent that level of clear signal all we know is that it's not many people yet,
not what it will look like in, say, a couple of years.

Probably, Windows 10 on Arm is neither suitable for gaming nor development

I'm not sure why you believe that Flutter development should be restricted to "power-user workhorse laptops".

I'm not saying that this is a major portion of the market right now, I'm saying that currently we aren't living up to our own described system requirements, nor do we know how much this segment may grow going forward.

No offense.

I was working in Xiaomi. I've learn a lot about the Snapdragon chip's capability. And I'm working on APPs and drivers on Windows for our IoT product.

As far as I known, Snapdragon is the only selection for Windows 10 on Arm now. Snapdragon is designed to handle mobile network and light work for phones. And it couldn't afford heavy jobs right now, maybe couple years later.

Windows 10 on Arm has little market share and poor software compatiblity. MSDN has few doc for Arm development as well. Both Matebook E 2019 and Lenovo Miix 630 have terrible comments. Surface Go and Surface Pro X are too pricy for what they are capable of, while Chrome book is a better choice.

So I don't think Windows 10 on Arm will populate in a few years.

Surface Neo, Windows 10X and 5G may be game changers. We'll see

@iapicca
Copy link
Contributor

iapicca commented Mar 27, 2020

For my very limited knowledge in the matter
Windows 10 on ARM should have a x64 app emulation
and current users might already have the possibility of running flutter,
but I think it will be desirable for Flutter to run "natively" on such a platform.

@tleasor
Copy link

tleasor commented Mar 27, 2020

@Sunbreak
The chips used in modern Windows on ARM devices (such as the Snapdragon 8cx) are much more capable than those in phones. A quick search shows that the Microsoft SQ1 chip is comparable to (or sometimes even better than) an 8th gen i7 in CPU performance at a fraction of the i7's power draw:

The Surface Go and Neo are also not relevant here since they both use Intel x64 chips and are therefore already capable of Flutter development.

@stuartmorgan
I just installed Steam on my Surface Pro X to check, and it shows up as "Windows 10 (32bit)". I'd have to agree that looking at marketshare numbers is somewhat premature at this stage, particularly since Steam is likely used more rarely on this kind of device.

@iapicca
Windows on ARM can only emulate 32-bit apps at the moment, although it's rumoured that 64-bit emulation may come sometime next year.

@t0lah t0lah closed this as completed Mar 31, 2020
Tools - Windows review automation moved this from Awaiting triage to Engineer reviewed Mar 31, 2020
@t0lah
Copy link
Author

t0lah commented Mar 31, 2020

Thank you guys for the very interesting discussion. I'll switch to another notebook, that's the easiest possibility.
Thanks again! Closed

@iapicca
Copy link
Contributor

iapicca commented Apr 3, 2020

Windows on ARM can only emulate 32-bit apps at the moment, although it's rumoured that 64-bit emulation may come sometime next year.

I didn't know that,
thanks @tleasor

@t0lah
even though you are switching to a different hardware adding support appear to be
a popular proposal
thanks for submitting it

@trevorwang
Copy link
Contributor

You're right, thanks for the hint! Removing Windows 10 SDK and adding Windows 11 SDK in VS Installer allowed me to have the app build and run in Debug mode, breakpoint was hit.
Besides, with recent upgrade/update of Flutter and Ubuntu I was also able rub Debug verision of ARM64 app in Linux as well.
It seems that ARM64 versions of all Desktop platforms (macOS, Windows, Linux) can build, run and trace Flutter apps under VSCode!

@maxim-saplin could you share any details for your working configuration? E.g. version of the Windows for ARM and version of VS Tools you are running?

Also, have you tried if it works in the Parallels v18?

Building a default Flutter's demo app to Windows target with Flutter 3.3.9 on Mac m1 in Parallels 18 is failing for with "library machine type 'x64' conflicts with target machine type 'ARM64'" error:

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
flutter_window.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewGetHWND referenced in function "public: struct HWND__ * __cdecl flutter::FlutterView::GetNativeWindow(void)" (?GetNativeWindow@FlutterView@flutter@@QEAAPEAUHWND__@@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
utils.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopResyncOutputStreams referenced in function "void __cdecl CreateAndAttachConsole(void)" (?CreateAndAttachConsole@@YAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
win32_window.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopGetDpiForMonitor referenced in function "public: bool __cdecl Win32Window::CreateAndShow(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,struct Win32Window::Point const &,struct Win32Window::Size const &)" (?CreateAndShow@Win32Window@@QEAA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBUPoint@1@AEBUSize@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineCreate referenced in function "public: __cdecl flutter::FlutterEngine::FlutterEngine(class flutter::DartProject const &)" (??0FlutterEngine@flutter@@QEAA@AEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineDestroy referenced in function "public: void __cdecl flutter::FlutterEngine::ShutDown(void)" (?ShutDown@FlutterEngine@flutter@@QEAAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineRun referenced in function "public: bool __cdecl flutter::FlutterEngine::Run(char const *)" (?Run@FlutterEngine@flutter@@QEAA_NPEBD@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineProcessMessages referenced in function "public: class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > __cdecl flutter::FlutterEngine::ProcessMessages(void)" (?ProcessMessages@FlutterEngine@flutter@@QEAA?AV?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@chrono@std@@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineReloadSystemFonts referenced in function "public: void __cdecl flutter::FlutterEngine::ReloadSystemFonts(void)" (?ReloadSystemFonts@FlutterEngine@flutter@@QEAAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineGetPluginRegistrar referenced in function "public: virtual struct FlutterDesktopPluginRegistrar * __cdecl flutter::FlutterEngine::GetRegistrarForPlugin(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?GetRegistrarForPlugin@FlutterEngine@flutter@@UEAAPEAUFlutterDesktopPluginRegistrar@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineGetMessenger referenced in function "public: __cdecl flutter::FlutterEngine::FlutterEngine(class flutter::DartProject const &)" (??0FlutterEngine@flutter@@QEAA@AEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerCreate referenced in function "public: __cdecl flutter::FlutterViewController::FlutterViewController(int,int,class flutter::DartProject const &)" (??0FlutterViewController@flutter@@QEAA@HHAEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerDestroy referenced in function "public: virtual __cdecl flutter::FlutterViewController::~FlutterViewController(void)" (??1FlutterViewController@flutter@@UEAA@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerGetView referenced in function "public: __cdecl flutter::FlutterViewController::FlutterViewController(int,int,class flutter::DartProject const &)" (??0FlutterViewController@flutter@@QEAA@HHAEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerHandleTopLevelWindowProc referenced in function "public: class std::optional<__int64> __cdecl flutter::FlutterViewController::HandleTopLevelWindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?HandleTopLevelWindowProc@FlutterViewController@flutter@@QEAA?AV?$optional@_J@std@@PEAUHWND__@@I_K_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSend referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::Send(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)const " (?Send@BinaryMessengerImpl@flutter@@UEBAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBE_KV?$function@$$A6AXPEBE_K@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSendWithReply referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::Send(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)const " (?Send@BinaryMessengerImpl@flutter@@UEBAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBE_KV?$function@$$A6AXPEBE_K@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSendResponse referenced in function "public: __cdecl <lambda_f9f4e2d847cf8b010089933373296ea0>::operator()(unsigned char const *,unsigned __int64)" (??R<lambda_f9f4e2d847cf8b010089933373296ea0>@@QEAA@PEBE_K@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSetCallback referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::SetMessageHandler(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::function<void __cdecl(unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)>)" (?SetMessageHandler@BinaryMessengerImpl@flutter@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6AXPEBE_KV?$function@$$A6AXPEBE_K@Z@std@@@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarRegisterExternalTexture referenced in function "public: virtual __int64 __cdecl flutter::TextureRegistrarImpl::RegisterTexture(class std::variant<class flutter::PixelBufferTexture,class flutter::GpuSurfaceTexture> *)" (?RegisterTexture@TextureRegistrarImpl@flutter@@UEAA_JPEAV?$variant@VPixelBufferTexture@flutter@@VGpuSurfaceTexture@2@@std@@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarUnregisterExternalTexture referenced in function "public: virtual bool __cdecl flutter::TextureRegistrarImpl::UnregisterTexture(__int64)" (?UnregisterTexture@TextureRegistrarImpl@flutter@@UEAA_N_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable referenced in function "public: virtual bool __cdecl flutter::TextureRegistrarImpl::MarkTextureFrameAvailable(__int64)" (?MarkTextureFrameAvailable@TextureRegistrarImpl@flutter@@UEAA_N_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
C:\Users\eu\IdeaProjects\flutter-example\windows\flutter\ephemeral\flutter_windows.dll.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\Debug\flutter_example.exe : fatal error LNK1120: 21 unresolved externals [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
Exception: Build process failed.

Hi @ekuleshov , did you solve the problem? I have the same issue here.

@ekuleshov
Copy link

Hi @ekuleshov , did you solve the problem? I have the same issue here.

Nope. I was hoping @maxim-saplin or someone else would shed some light on this...

@lahoti-kb
Copy link

You're right, thanks for the hint! Removing Windows 10 SDK and adding Windows 11 SDK in VS Installer allowed me to have the app build and run in Debug mode, breakpoint was hit.
Besides, with recent upgrade/update of Flutter and Ubuntu I was also able rub Debug verision of ARM64 app in Linux as well.
It seems that ARM64 versions of all Desktop platforms (macOS, Windows, Linux) can build, run and trace Flutter apps under VSCode!

@maxim-saplin could you share any details for your working configuration? E.g. version of the Windows for ARM and version of VS Tools you are running?

Also, have you tried if it works in the Parallels v18?

Building a default Flutter's demo app to Windows target with Flutter 3.3.9 on Mac m1 in Parallels 18 is failing for with "library machine type 'x64' conflicts with target machine type 'ARM64'" error:

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
flutter_window.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewGetHWND referenced in function "public: struct HWND__ * __cdecl flutter::FlutterView::GetNativeWindow(void)" (?GetNativeWindow@FlutterView@flutter@@QEAAPEAUHWND__@@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
utils.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopResyncOutputStreams referenced in function "void __cdecl CreateAndAttachConsole(void)" (?CreateAndAttachConsole@@YAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
win32_window.obj : error LNK2019: unresolved external symbol __imp_FlutterDesktopGetDpiForMonitor referenced in function "public: bool __cdecl Win32Window::CreateAndShow(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,struct Win32Window::Point const &,struct Win32Window::Size const &)" (?CreateAndShow@Win32Window@@QEAA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBUPoint@1@AEBUSize@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineCreate referenced in function "public: __cdecl flutter::FlutterEngine::FlutterEngine(class flutter::DartProject const &)" (??0FlutterEngine@flutter@@QEAA@AEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineDestroy referenced in function "public: void __cdecl flutter::FlutterEngine::ShutDown(void)" (?ShutDown@FlutterEngine@flutter@@QEAAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineRun referenced in function "public: bool __cdecl flutter::FlutterEngine::Run(char const *)" (?Run@FlutterEngine@flutter@@QEAA_NPEBD@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineProcessMessages referenced in function "public: class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > __cdecl flutter::FlutterEngine::ProcessMessages(void)" (?ProcessMessages@FlutterEngine@flutter@@QEAA?AV?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@chrono@std@@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineReloadSystemFonts referenced in function "public: void __cdecl flutter::FlutterEngine::ReloadSystemFonts(void)" (?ReloadSystemFonts@FlutterEngine@flutter@@QEAAXXZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineGetPluginRegistrar referenced in function "public: virtual struct FlutterDesktopPluginRegistrar * __cdecl flutter::FlutterEngine::GetRegistrarForPlugin(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?GetRegistrarForPlugin@FlutterEngine@flutter@@UEAAPEAUFlutterDesktopPluginRegistrar@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_engine.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopEngineGetMessenger referenced in function "public: __cdecl flutter::FlutterEngine::FlutterEngine(class flutter::DartProject const &)" (??0FlutterEngine@flutter@@QEAA@AEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerCreate referenced in function "public: __cdecl flutter::FlutterViewController::FlutterViewController(int,int,class flutter::DartProject const &)" (??0FlutterViewController@flutter@@QEAA@HHAEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerDestroy referenced in function "public: virtual __cdecl flutter::FlutterViewController::~FlutterViewController(void)" (??1FlutterViewController@flutter@@UEAA@XZ) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerGetView referenced in function "public: __cdecl flutter::FlutterViewController::FlutterViewController(int,int,class flutter::DartProject const &)" (??0FlutterViewController@flutter@@QEAA@HHAEBVDartProject@1@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(flutter_view_controller.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopViewControllerHandleTopLevelWindowProc referenced in function "public: class std::optional<__int64> __cdecl flutter::FlutterViewController::HandleTopLevelWindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?HandleTopLevelWindowProc@FlutterViewController@flutter@@QEAA?AV?$optional@_J@std@@PEAUHWND__@@I_K_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSend referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::Send(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)const " (?Send@BinaryMessengerImpl@flutter@@UEBAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBE_KV?$function@$$A6AXPEBE_K@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSendWithReply referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::Send(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)const " (?Send@BinaryMessengerImpl@flutter@@UEBAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBE_KV?$function@$$A6AXPEBE_K@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSendResponse referenced in function "public: __cdecl <lambda_f9f4e2d847cf8b010089933373296ea0>::operator()(unsigned char const *,unsigned __int64)" (??R<lambda_f9f4e2d847cf8b010089933373296ea0>@@QEAA@PEBE_K@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopMessengerSetCallback referenced in function "public: virtual void __cdecl flutter::BinaryMessengerImpl::SetMessageHandler(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::function<void __cdecl(unsigned char const *,unsigned __int64,class std::function<void __cdecl(unsigned char const *,unsigned __int64)>)>)" (?SetMessageHandler@BinaryMessengerImpl@flutter@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6AXPEBE_KV?$function@$$A6AXPEBE_K@Z@std@@@Z@4@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarRegisterExternalTexture referenced in function "public: virtual __int64 __cdecl flutter::TextureRegistrarImpl::RegisterTexture(class std::variant<class flutter::PixelBufferTexture,class flutter::GpuSurfaceTexture> *)" (?RegisterTexture@TextureRegistrarImpl@flutter@@UEAA_JPEAV?$variant@VPixelBufferTexture@flutter@@VGpuSurfaceTexture@2@@std@@@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarUnregisterExternalTexture referenced in function "public: virtual bool __cdecl flutter::TextureRegistrarImpl::UnregisterTexture(__int64)" (?UnregisterTexture@TextureRegistrarImpl@flutter@@UEAA_N_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
flutter_wrapper_app.lib(core_implementations.obj) : error LNK2019: unresolved external symbol __imp_FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable referenced in function "public: virtual bool __cdecl flutter::TextureRegistrarImpl::MarkTextureFrameAvailable(__int64)" (?MarkTextureFrameAvailable@TextureRegistrarImpl@flutter@@UEAA_N_J@Z) [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
C:\Users\eu\IdeaProjects\flutter-example\windows\flutter\ephemeral\flutter_windows.dll.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\Debug\flutter_example.exe : fatal error LNK1120: 21 unresolved externals [C:\Users\eu\IdeaProjects\flutter-example\build\windows\runner\flutter_example.vcxproj]
Exception: Build process failed.

@ekuleshov @trevorwang
I got these errors too on Visual Studio 2022 (17.5.1). I tried with Visual Studio 2019 (16.11) and the app built fine for x64.

@ImagineBoom

This comment was marked as resolved.

@trevorwang
Copy link
Contributor

Just tried the suggestion #122098 from @huycozy , it works with vs 2019
FYI @ekuleshov @lahoti-kb

@mattsrobot
Copy link

I would like to know if Windows on ARM is working, currently I get the linker errors when building.

@LauDijksterhuis
Copy link

LauDijksterhuis commented May 3, 2023

Any update on this?

I just got it working with VS2019, but it feels like a hacky solution...

@mattsrobot
Copy link

Any update on this?

I just got it working with VS2019, but it feels like a hacky solution...

Is it possible to submit x64 builds to Microsoft App Store using this solution?

@LauDijksterhuis
Copy link

I think so. My first attempt was denied, but that's because "some features did not work" but from the review it seems they were able to test it, which I think equals to being able to publish via the Microsoft store

@mattsrobot
Copy link

mattsrobot commented May 11, 2023

I think so. My first attempt was denied, but that's because "some features did not work" but from the review it seems they were able to test it, which I think equals to being able to publish via the Microsoft store

That's awesome, great work 😅 looking forward to hopefully run my workflow in a VM than using another Laptop 🚀

@LeoSandbox
Copy link

Same issue on Mac mini M2 Pro running Parallels Desktop Windows 11 Pro using the latest Visual Studio 2022. There is no way to build with this VS version, regardless if Windows 10 SDK or Windows 11 SDK is installed.

The workaround of installing Visual Studio 2019 16.11.5 with Windows 10 SDK works for me, I can debug and release.

@hpelitebook745G2
Copy link

@LeoSandbox could you please provide the download link for Visual Studio 2019 16.11.5 with Windows 10 SDK? I tried this Community 2019 here and installed however I got this message:
Screenshot 2023-10-04 at 1 47 49 PM
I'm running Windows 11 Parallels Desktop on an M1 macbook.

I saw this link but it recommends Visual Studio 2022 17.4

@LeoSandbox
Copy link

Try this one: https://www.techspot.com/downloads/7241-visual-studio-2019.html

@tallinn1960
Copy link

@LeoSandbox could you please provide the download link for Visual Studio 2019 16.11.5 with Windows 10 SDK? I tried this Community 2019 here and installed however I got this message: Screenshot 2023-10-04 at 1 47 49 PM I'm running Windows 11 Parallels Desktop on an M1 macbook.

I saw this link but it recommends Visual Studio 2022 17.4

You can safely ignore that warning for now. Flutter will work with it. Don't go for VS Studio 2022.

However, it would be fine if Flutter would work with a Visual Studio 2022 installation in Windows 11 on ARM (Windows 10 on ARM is no longer supported by MS), as that contains both the build tools für x86_64 and for arm64. If Flutter is then only using the x86_64 build tools and building x86_64 binaries that would be fine for now. Until Windows on ARM gets more love by the market (which it will soon).

@loic-sharma
Copy link
Member

@pbo-linaro implemented this with #131843 and #141930. Flutter on the beta and stable channels build x64 executables that run using emulation on Arm64 machines. Flutter on the master channel targets your host architecture: an x64 executable is built on an x64 machine, and an Arm64 executable is built on an Arm64 machine.

#62597 tracks the remaining work, including adding cross-compilation.

I'll close this item as it is completed. Please create new issues if you run into problems running Flutter on Windows Arm64.

@huycozy huycozy added the r: fixed Issue is closed as already fixed in a newer version label Feb 1, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter customer: crowd Affects or could affect many people, though not necessarily a specific customer. engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-host-arm Building on an ARM-based platform platform-windows Building on or for Windows specifically r: fixed Issue is closed as already fixed in a newer version team-engine Owned by Engine team tool Affects the "flutter" command-line tool. See also t: labels. triaged-engine Triaged by Engine team
Projects
Tools - Windows review
  
Engineer reviewed
Development

No branches or pull requests