-
Notifications
You must be signed in to change notification settings - Fork 127
Description
Hello team,
I'm trying to implement Firebase CPP SDK on the Desktop version following the steps on (https://github.com/firebase/quickstart-cpp). Unfortunately, I always get the linking error on Debug mode (Release mode is ok).
-
First, I used the latest prebuilt package(firebase_cpp_sdk_6.7.0) but it's failed with the linking error : "LNK1143 invalid or corrupt file: no symbol for COMDAT section 0x60FF \build\firebase_app.lib(3b90730b34b9dfb9de1097092477c56f_flatbuffers.dir_Debug_idl_parser.obj)"
I'm using VS Studio 2019 to develop, your package is in VS2015 and maybe there is my problem. -
Second, I follow the steps to build the source code. The thing I need is static libs in /MT format, so I changed a little big from CMake like:
if (MSVC)
# Googletest requires MSVC to compile with the static version of the runtime
# library, so define the appropriate runtime flag, before adding libraries.
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
endif()
When using these libs, i got a lot of linking error like:
Error LNK2001 unresolved external symbol "public: virtual __cdecl firebase::rest::Request::~Request(void)" (??1Request@rest@firebase@@UEAA@XZ) \build\firebase_auth-d.lib(secure_token_request.obj)
Error LNK2001 unresolved external symbol "public: bool __cdecl flatbuffers::Parser::Parse(char const *,char const * *,char const *)" (?Parse@Parser@flatbuffers@@QEAA_NPEBDPEAPEBD0@Z) \build\firebase_app-d.lib(app_options.obj)
Error LNK2001 unresolved external symbol "public: virtual bool __cdecl firebase::rest::Response::ProcessHeader(char const *,unsigned __int64)" (?ProcessHeader@Response@rest@firebase@@UEAA_NPEBD_K@Z) \build\firebase_auth-d.lib(user_desktop.obj)
Error LNK2001 unresolved external symbol "public: virtual void __cdecl firebase::rest::Response::GetBody(char const * *,unsigned __int64 *)const " (?GetBody@Response@rest@firebase@@UEBAXPEAPEBDPEA_K@Z) \build\firebase_auth-d.lib(user_desktop.obj
Could you please show me any wrong steps I made, and any thing I need to do to have the project linked correctly?
Thank you!
Please fill in the following fields:
Firebase C++ SDK version: v6.7.0. The same error with 6.6.1
Firebase plugins in use (Auth, Database, etc.): Auth, Analytics, Admob
Additional SDKs you are using (Facebook, AdMob, etc.): Firebase Admob
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Window
Platform you are targeting (iOS, Android, and/or desktop): Desktop
Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? No
What's the issue repro rate? 100%