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

Firestore: Windows "unresolved external symbol" link errors: __imp_SymSetOptions, __imp_SymInitialize, __imp_SymFromAddr, BCryptOpenAlgorithmProvider, BCryptCloseAlgorithmProvider, BCryptGenRandom #146

Closed
dconeybe opened this issue Dec 18, 2024 · 0 comments · Fixed by #147
Assignees

Comments

@dconeybe
Copy link
Contributor

[REQUIRED] Please fill in the following fields:

  • Which Firebase Sample: Firestore
  • Firebase C++ SDK version: 12.5.0
  • Additional SDKs you are using: none
  • Platform you are using the SDK on: Windows
  • Platform you are targeting: Windows Desktop

[REQUIRED] Please describe the issue here:

Build fails with "unresolved external symbol" link errors for symbols: __imp_SymSetOptions, __imp_SymInitialize, __imp_SymFromAddr, BCryptOpenAlgorithmProvider, BCryptCloseAlgorithmProvider, BCryptGenRandom

Steps to reproduce:

Prerequisites:

  • Visual Studio 2022 Community edition has been installed
  • Firebase CPP SDK v12.5.0 has been downloaded and unzipped into the directory c:\Users\foouser\firebase_cpp_sdk
  • The google-services.json file has been downloaded from the Firebase console and is located in the directory c:\users\foouser
  • The commands below are run in a Visual Studio command prompt; alternately, open a vanilla Command Prompt and run: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"

Run these commands in a Command Prompt:

git clone https://github.com/firebase/quickstart-cpp.git
cd quickstart-cpp/firestore/testapp
copy c:\users\foouser\google-services.json
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DFIREBASE_CPP_SDK_DIR=c:\Users\foouser\firebase_cpp_sdk
cmake --build build --config Debug
Expected Results:

Build succeeds

Actual Results:

Build fails with this error:

firebase_firestore.lib(7253c3fdc9ea1e17e3d358afbb5787d8_absl_symbolize.dir_Debug_symbolize.obj) : error LNK2019: unresolved external symbol __imp_SymSetOptions referenced in function "void __cdecl f_b_absl::lts_20240116::InitializeSymbolizer(char const *)" (?InitializeSymbolizer@lts_20240116@f_b_absl@@YAXPEBD@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
firebase_firestore.lib(7253c3fdc9ea1e17e3d358afbb5787d8_absl_symbolize.dir_Debug_symbolize.obj) : error LNK2019: unresolved external symbol __imp_SymInitialize referenced in function "void __cdecl f_b_absl::lts_20240116::InitializeSymbolizer(char const *)" (?InitializeSymbolizer@lts_20240116@f_b_absl@@YAXPEBD@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
firebase_firestore.lib(7253c3fdc9ea1e17e3d358afbb5787d8_absl_symbolize.dir_Debug_symbolize.obj) : error LNK2019: unresolved external symbol __imp_SymFromAddr referenced in function "bool __cdecl f_b_absl::lts_20240116::Symbolize(void const *,char *,int)" (?Symbolize@lts_20240116@f_b_absl@@YA_NPEBXPEADH@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
firebase_firestore.lib(d72f1e28510793745cdd9199e7b30852_absl_random_internal_seed_material.dir_Debug_seed_material.obj) : error LNK2019: unresolved external symbol BCryptOpenAlgorithmProvider referenced in function "bool __cdecl f_b_absl::lts_20240116::random_internal::`anonymous namespace'::ReadSeedMaterialFromOSEntropyImpl(class f_b_absl::lts_20240116::Span<unsigned int>)" (?ReadSeedMaterialFromOSEntropyImpl@?A0x37b510a3@random_internal@lts_20240116@f_b_absl@@YA_NV?$Span@I@34@@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
firebase_firestore.lib(d72f1e28510793745cdd9199e7b30852_absl_random_internal_seed_material.dir_Debug_seed_material.obj) : error LNK2019: unresolved external symbol BCryptCloseAlgorithmProvider referenced in function "bool __cdecl f_b_absl::lts_20240116::random_internal::`anonymous namespace'::ReadSeedMaterialFromOSEntropyImpl(class f_b_absl::lts_20240116::Span<unsigned int>)" (?ReadSeedMaterialFromOSEntropyImpl@?A0x37b510a3@random_internal@lts_20240116@f_b_absl@@YA_NV?$Span@I@34@@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
firebase_firestore.lib(d72f1e28510793745cdd9199e7b30852_absl_random_internal_seed_material.dir_Debug_seed_material.obj) : error LNK2019: unresolved external symbol BCryptGenRandom referenced in function "bool __cdecl f_b_absl::lts_20240116::random_internal::`anonymous namespace'::ReadSeedMaterialFromOSEntropyImpl(class f_b_absl::lts_20240116::Span<unsigned int>)" (?ReadSeedMaterialFromOSEntropyImpl@?A0x37b510a3@random_internal@lts_20240116@f_b_absl@@YA_NV?$Span@I@34@@Z) [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\Debug\desktop_testapp.exe : fatal error LNK1120: 6 unresolved externals [C:\Users\foouser\work\quickstart-cpp\firestore\testapp\build\desktop_testapp.vcxproj]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant