NE library link order

I’ve been experimenting with adding desktop support to extension-firebase, as it would be useful during development to see the effects of remote config before running on device.

The problem is that on x64_64-win32 (the only platform I’ve tried so far) the engine fails to link:

lld-link: error: undefined symbol: public: void __cdecl firebase::Mutex::Acquire(void)
>>> referenced by /tmp/job13747211900906676459/upload/firebase/src/firebase.cpp:110
>>>               Firebase_1.lib(firebase.cpp_0.o):(int __cdecl Firebase_GetInstallationAuthToken(struct lua_State *))

The documentation states

The Firebase C++ library firebase_app is required, and it must always be listed last.

whereas the clang invocation when building the example, after adding firebase_app.lib and firebase_installations.lib to firebase/lib/x86_64-win32, specifies the following. Is it possible to modify this order?

-lfirebase_installations -lfirebase_app -lFirebase_1
1 Like

No, there is no way for the user to specify this.

In our build_input.yml script however, I see that we don’t have the usual -Wl,--start-group around the libraries, which would be my first attempt.

Do you have a repro branch I can try with?
Hopefully I can add a fix to the beta on monday

(updated missing link)

2 Likes

Thanks, it’s https://github.com/DreamRealityInteractive/extension-firebase/tree/desktop
NB although I modified firebase.cpp to compile on Linux/MacOS/Windows, at this stage I only added the x86_64-win32 libs.

1 Like

Created an issue for this

2 Likes