direct access in function X from file Y to global weak symbol
I’m getting these linker warnings when doing some peerconnection testing. Specifically when calling AddTransceiver() [1]. No matter if in my C++ project I set the ‘visibility’ compilation flag to ‘hidden’ or not.
The functionality is correct though.
Here one of such warnings:
““
ld: warning: direct access in function ‘webrtc::VideoStreamEncoder::ReconfigureEncoder()’ from file ‘../../deps/libwebrtc/lib/libwebrtc.a(video_stream_encoder.o)’ to global weak symbol ‘void rtc::webrtc_checks_impl::LogStreamer<>::Call<>(char const*, int, char const*)::t’ from file ‘CMakeFiles/test.dir/PeerConnection.test.cpp.o’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
““
Could anyone please comment on why is this happening and how to avoid it?
Kind regards
[1]: method signature:
virtual RTCErrorOr<:scoped_refptr>>
AddTransceiver(cricket::MediaType media_type);
Read more here: Source link
