Can be a real pain!
Ryzom Core Studio is a cross platform tool, the entire point of creating it was to move away and get free of the shackles of Windows as the old Ryzom tools were written with MFC.
Unfortunately two of it’s plugins kept triggering an assert when loaded together.
As it turns out the source of the problem was that GCC and Visual Studio link libraries differently:
Ryzom is built on Nel the Nevrax libraries. One of these libraries is the LIGO library, which is basically a data library. Also Nel uses a quite powerful (de)serialization system which is based on an abstract object factory, which is implemented using static methods and static member variables. What’s also important that these Nel libraries are linked statically right now.
Unfortunately as it turns out it behaves differently depending on which compiler built it: GCC or Visual Studio.
When building with Visual Studio each plugin gets it’s own instance of the static variables, while with GCC they share the same one.
So when the LIGO library is started up, it registers it’s classes. When the first plugin that uses it loads there’s no problem, but with the second an assert is triggered because those classes have already been registered.
In this case solving this problem was fairly simple: Since those plugins use their own LIGO configs ( a context object of sorts ), guarding against multiple registrations was enough.