Skip to content

[Win64] Prebuilt 7.0.1 linkage errors. #271

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

Closed
Pandoa opened this issue Feb 5, 2021 · 1 comment
Closed

[Win64] Prebuilt 7.0.1 linkage errors. #271

Pandoa opened this issue Feb 5, 2021 · 1 comment

Comments

@Pandoa
Copy link

Pandoa commented Feb 5, 2021

[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:

  1. firebase_app.lib
  2. firebase_remote_config.lib
  3. firebase_firestore.lib
  4. 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:

  1. Download the Firebase C++ SDK version 7.0.1.
  2. Create a new blank Visual Studio project.
  3. 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;
}
@jonsimantov
Copy link
Contributor

jonsimantov commented Feb 10, 2021

Thanks for letting us know about this issue. A fix (#275) has been merged into our development branch and will be included in the next binary SDK release.

@jonsimantov jonsimantov added type: bug and removed new New issue. labels Feb 10, 2021
@jonsimantov jonsimantov added this to the 7.1.0 milestone Feb 11, 2021
@firebase firebase locked and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants