melihercan / WebRTCnative

MIT License
0 stars 2 forks source link

Shared Libraries have undefined symbols #1

Open Sil3ntStorm opened 9 months ago

Sil3ntStorm commented 9 months ago

When building WebRTC as a shared library there are a ton of undefined symbols which should not be the case given that it is a shared library. Any idea on how to get rid of the undefined symbols in the resulting shared library? A lot of them are from the standard library too, with some custom namespace (eg. std::__Cr)

melihercan commented 9 months ago

Which platform? Windows or macOS?

Shared libraries may use other libraries. You need to add the required libraries to your app.

Sil3ntStorm commented 9 months ago

Linux Shared Build. It should not have undefined references to like protobuf or std::__Cr::basic_string though?

melihercan commented 8 months ago

Any library including this one can refer to other libraries. An app will gather all libraries (link them) with your app code. What you need to do is Google the unresolved externals, find the library that provides this symbol, and link it in your app. Then your problem will be solved.