admin管理员组文章数量:1287785
I’m working on a Flutter project targeting Windows. Initially, I created a new Flutter project, and the app ran perfectly on Windows without any issues. However, after integrating Firebase (specifically firebase_core and firebase_firestore) into the project and attempting to rerun the app, I encountered a series of linker errors during the build process.
The errors seem to revolve around unresolved external symbols, particularly __std_init_once_link_alternate_names_and_abort and others like __std_find_trivial_2 and __std_min_element_8. Below is the full error output from the build process:
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_document_reference.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_firestore.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_field_filter.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_query.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(4ee4852b7e44084b709f4c86224171f1_absl_str_format_internal.dir_Debug_arg.obj) : error LNK2019: unresolved external symbol __std_find_trivial_2 referenced in function "wchar_t const * __cdecl __std_find_trivial<wchar_t const ,wchar_t>(wchar_t const *,wchar_t const *,wchar_t)" (??$__std_find_trivial@$$CB_W_W@@YAPEB_WPEB_W0_W@Z) [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(ea039456823ba76e9082b438a5fcc026_grpc.dir_Debug_writing.obj) : error LNK2019: unresolved external symbol __std_min_element_8 referenced in function "__int64 const * __cdecl __std_min_element<__int64 const >(__int64 const *,__int64 const *)" (??$__std_min_element@$$CB_J@@YAPEB_JPEB_J0@Z) [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
C:\Project\testingproject\build\windows\x64\runner\Debug\testingproject.exe : fatal error LNK1120: 7 unresolved externals [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
Error: Build process failed.
environment:
sdk: ^3.7.0
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.8
firebase_core: ^3.12.0
cloud_firestore: ^5.6.4
firebase_auth: ^5.5.0
What could be causing these linker errors after adding Firebase to my Flutter Windows project? Is this related to a mismatch in the C++ standard library, Firebase SDK, or something else? How can I resolve this error
Any help or pointers would be greatly appreciated!
I’m working on a Flutter project targeting Windows. Initially, I created a new Flutter project, and the app ran perfectly on Windows without any issues. However, after integrating Firebase (specifically firebase_core and firebase_firestore) into the project and attempting to rerun the app, I encountered a series of linker errors during the build process.
The errors seem to revolve around unresolved external symbols, particularly __std_init_once_link_alternate_names_and_abort and others like __std_find_trivial_2 and __std_min_element_8. Below is the full error output from the build process:
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_document_reference.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_firestore.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_field_filter.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(1563d4ec1bb2cfbdcd33c8f821a59874_firestore_core.dir_Debug_query.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(4ee4852b7e44084b709f4c86224171f1_absl_str_format_internal.dir_Debug_arg.obj) : error LNK2019: unresolved external symbol __std_find_trivial_2 referenced in function "wchar_t const * __cdecl __std_find_trivial<wchar_t const ,wchar_t>(wchar_t const *,wchar_t const *,wchar_t)" (??$__std_find_trivial@$$CB_W_W@@YAPEB_WPEB_W0_W@Z) [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
firebase_firestore.lib(ea039456823ba76e9082b438a5fcc026_grpc.dir_Debug_writing.obj) : error LNK2019: unresolved external symbol __std_min_element_8 referenced in function "__int64 const * __cdecl __std_min_element<__int64 const >(__int64 const *,__int64 const *)" (??$__std_min_element@$$CB_J@@YAPEB_JPEB_J0@Z) [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
C:\Project\testingproject\build\windows\x64\runner\Debug\testingproject.exe : fatal error LNK1120: 7 unresolved externals [C:\Project\testingproject\build\windows\x64\runner\testingproject.vcxproj]
Error: Build process failed.
environment:
sdk: ^3.7.0
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.8
firebase_core: ^3.12.0
cloud_firestore: ^5.6.4
firebase_auth: ^5.5.0
What could be causing these linker errors after adding Firebase to my Flutter Windows project? Is this related to a mismatch in the C++ standard library, Firebase SDK, or something else? How can I resolve this error
Any help or pointers would be greatly appreciated!
Share Improve this question asked Feb 24 at 9:59 Dasun DolaDasun Dola 6232 gold badges9 silver badges25 bronze badges 1- 1 Related to github/microsoft/STL/pull/2381 perhaps – Anders Commented Feb 24 at 11:21
1 Answer
Reset to default 0I found the solution. I uninstalled Visual Studio, downloaded the latest Visual Studio setup, and used that setup to install C++. Then, I updated all the Firebase packages in the Flutter project.
本文标签:
版权声明:本文标题:c++ - Flutter Windows App - "error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort&a 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741280659a2369987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论