Closed Schlumpf closed 10 years ago
Why would it be nice?
Give reasons why something should be changed.
Foreseeing one of possible reasons you might have, I want to ask you something.
Does Tox preserve binary compatibility?
A library is binary compatible, if a program linked dynamically to a former version of the library continues running with newer versions of the library without the need to recompile. http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++#Definition
If by updating the Tox library to a new one the GUI would need to be recompiled, might as well leave things as they are and continue linking statically, either way GUI would be recompiled.
We definitely should wait for TOX 1.0. At final release, TOX will have have binary compatibility till the next major release (I hope so...). With a dynamic TOX library, you need the dll/so only once on your system, for different applications/clients. Later on, the TOX Core team can fix bugs (binary compatible) without updating the GUI.
Decided to switch to dynamic linking of toxcore for Unix-like systems since the API seems more stable and dynamic linking is what you want on those systems. Windows still statically links, since there don't seem to be any gain in dynamic linking on it anyway, when static linking links only used parts of libraries, decreasing overall binary size, and it's faster than dynamic linking because there is no need for searching and loading of libraries. I also have set up libtoxcore builds for Windows on our Jenkins to decrease build times of windows-based projects, because all projects were rebuilding sodium and toxcore for themselves every single time, so now they just link to the most up-to-date already precompiled ones instead. It's also convenient for people building Tox projects on Windows, as those libtoxcore builds include all dependencies (the whole list of libraries: toxcore, toxav, opus, vpx, sodium) both for 32-bit and 64-bit, both static and shared (except vpx, it doesn't support shared yet) -- just download and link against them.
So, I'm closing the issue.
I think it would be nice to link tox dynamically, like Toxic does.