Closed
Description
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website
- Firebase C++ SDK version: 7.0.1
- Problematic Firebase Component: App, Remote Config
- Other Firebase Components in use: Auth, Firestore
- Platform you are using the C++ SDK on: Windows x64-Release /MD vs2019
- Platform you are targeting: desktop
[REQUIRED] Please describe the issue here:
Impossible to build an app linked against the SDK with a linkage error if the following libraries are linked:
- firebase_app.lib
- firebase_remote_config.lib
- firebase_firestore.lib
- firebase_auth.lib
Exact linkage error:
1>firebase_app.lib(0865aae1211b26b3ccf22fd1b579e000_protobuf_nanopb_static.dir_Release_pb_decode.obj) : error LNK2005: f_b_pb_decode already defined in firebase_remote_config.lib(c80cae8cb6fc354c32078cec2fc51bbc_firebase_remote_config.dir_Release_pb_decode.obj)
1>firebase_app.lib(0865aae1211b26b3ccf22fd1b579e000_protobuf_nanopb_static.dir_Release_pb_decode.obj) : error LNK2005: f_b_pb_decode_noinit already defined in firebase_remote_config.lib(c80cae8cb6fc354c32078cec2fc51bbc_firebase_remote_config.dir_Release_pb_decode.obj)
1>firebase_app.lib(0865aae1211b26b3ccf22fd1b579e000_protobuf_nanopb_static.dir_Release_pb_decode.obj) : error LNK2005: f_b_pb_decode_delimited already defined in firebase_remote_config.lib(c80cae8cb6fc354c32078cec2fc51bbc_firebase_remote_config.dir_Release_pb_decode.obj)
...
fatal error LNK1169: one or more multiply defined symbols found.
Steps to reproduce:
- Download the Firebase C++ SDK version 7.0.1.
- Create a new blank Visual Studio project.
- Compile the Relevant Code provided below.
Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? Yes
Issue repro rate: 100%
Project to reproduce:
firebase_project_reproduction.zip
(relevant SDK libs and headers included).
Output:
firebase_app.lib: XXX already defined in firebase_remote_config.lib
...
fatal error LNK1169: one or more multiply defined symbols found.
Relevant Code:
#pragma comment(lib, "firebase_app.lib")
#pragma comment(lib, "firebase_remote_config.lib")
#pragma comment(lib, "firebase_firestore.lib")
#pragma comment(lib, "firebase_auth.lib")
#include "firebase/remote_config.h"
#include "firebase/firestore/query.h"
int main()
{
firebase::firestore::Query Query;
}