MixinNetwork / MixinNetwork/flutter-plugins

[win_toast] 更新最新代码后,win_toast编译失败

Open
#185 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted win_toast
Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

已启动重新生成…
1>------ 已启动全部重新生成: 项目: ZERO_CHECK, 配置: Debug x64 ------
1>Checking Build System
2>------ 已启动全部重新生成: 项目: flutter_assemble, 配置: Debug x64 ------
2>Generating E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_windows.dll, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_export.h, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_windows.h, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_messenger.h, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_plugin_registrar.h, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/flutter_texture_registrar.h, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc, E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
2>Building Custom Rule E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/CMakeLists.txt
3>------ 已启动全部重新生成: 项目: flutter_wrapper_plugin, 配置: Debug x64 ------
3>Building Custom Rule E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/CMakeLists.txt
3>core_implementations.cc
3>standard_codec.cc
3>plugin_registrar.cc
3>正在生成代码...
3>flutter_wrapper_plugin.vcxproj -> E:\githubcode\flutter-plugins\packages\win_toast\example\build\windows\flutter\Debug\flutter_wrapper_plugin.lib
4>------ 已启动全部重新生成: 项目: win_toast_plugin, 配置: Debug x64 ------
4>Building Custom Rule E:/githubcode/flutter-plugins/packages/win_toast/example/windows/flutter/ephemeral/.plugin_symlinks/win_toast/windows/CMakeLists.txt
4>win_toast_plugin.cpp
4>DesktopNotificationManagerCompat.cpp
4>notification_manager.cc
4>dll_importer.cc
4>正在生成代码...
4>  正在创建库 E:/githubcode/flutter-plugins/packages/win_toast/example/build/windows/plugins/win_toast/Debug/win_toast_plugin.lib 和对象 E:/githubcode/flutter-plugins/packages/win_toast/example/build/windows/plugins/win_toast/Debug/win_toast_plugin.exp
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_GetRestrictedErrorInfo,函数 "public: __cdecl winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::take_ownership_from_abi_t)" (??0hresult_error@winrt@@QEAA@Uhresult@1@Utake_ownership_from_abi_t@1@@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_GetRestrictedErrorInfo
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_RoGetActivationFactory,函数 "struct winrt::Windows::Foundation::IActivationFactory __cdecl winrt::get_activation_factory<struct winrt::Windows::Foundation::IActivationFactory>(struct winrt::param::hstring const &)" (??$get_activation_factory@UIActivationFactory@Foundation@Windows@winrt@@@winrt@@YA?AUIActivationFactory@Foundation@Windows@0@AEBUhstring@param@0@@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_RoGetActivationFactory
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_RoOriginateLanguageException,函数 "private: void __cdecl winrt::hresult_error::originate(struct winrt::hresult,void *)" (?originate@hresult_error@winrt@@AEAAXUhresult@2@PEAX@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_RoOriginateLanguageException
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_SetRestrictedErrorInfo,函数 "public: struct winrt::hresult __cdecl winrt::hresult_error::to_abi(void)const " (?to_abi@hresult_error@winrt@@QEBA?AUhresult@2@XZ) 中引用了该符号
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsCreateString,函数 "void * __cdecl winrt::impl::create_string(wchar_t const *,unsigned int)" (?create_string@impl@winrt@@YAPEAXPEB_WI@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_WindowsCreateString
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsCreateStringReference,函数 "public: __cdecl winrt::param::hstring::hstring(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0hstring@param@winrt@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_WindowsCreateStringReference
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsDeleteString,函数 "public: static void __cdecl winrt::impl::hstring_traits::close(void *)" (?close@hstring_traits@impl@winrt@@SAXPEAX@Z) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_WindowsDeleteString
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsPreallocateStringBuffer,函数 "public: __cdecl winrt::impl::hstring_builder::hstring_builder(unsigned int)" (??0hstring_builder@impl@winrt@@QEAA@I@Z) 中引用了该符号
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsDeleteStringBuffer,函数 "public: __cdecl winrt::impl::hstring_builder::~hstring_builder(void)" (??1hstring_builder@impl@winrt@@QEAA@XZ) 中引用了该符号
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsPromoteStringBuffer,函数 "public: struct winrt::hstring __cdecl winrt::impl::hstring_builder::to_hstring(void)" (?to_hstring@hstring_builder@impl@winrt@@QEAA?AUhstring@3@XZ) 中引用了该符号
4>win_toast_plugin.obj : error LNK2019: 无法解析的外部符号 WINRT_WindowsGetStringRawBuffer,函数 "public: wchar_t const * __cdecl winrt::hstring::begin(void)const " (?begin@hstring@winrt@@QEBAPEB_WXZ) 中引用了该符号
4>DesktopNotificationManagerCompat.obj : error LNK2001: 无法解析的外部符号 WINRT_WindowsGetStringRawBuffer
4>E:\githubcode\flutter-plugins\packages\win_toast\example\build\windows\plugins\win_toast\Debug\win_toast_plugin.dll : fatal error LNK1120: 11 个无法解析的外部命令

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows example build and inspect windows/CMakeLists.txt alongside win_toast_plugin.cpp and DesktopNotificationManagerCompat.cpp. Trace the missing WINRT_* symbols and compare the plugin's link configuration with the failing linker output. Done means the win_toast example builds successfully without unresolved external symbols.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, flutter
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.