How do you distribute your C++ libraries
If you have a nice C++ Library with lots of utility functions, how do you distribute your libraries?
Building a single archie file (library file xxlib.a) does not work, on all platforms. So it is required to build such archives for each platform supported. Thats all?
NO. Thanks to 'flexibility' given to compiler vendors to follow their own Name mangling schemes, your application may not be able to link properly with the library though the library is built for your platform. The library may have a differen name mangling schema than the compiler you are using to build your application. So linking may fail.
Solution: Build your library for all known/supported platforms and Compiler version combinations in the world and distribute. aah, okay, Looks fine.
What if a new compiler version comes up with another name mangling scheme?
Simple, Build an archive with that compiler version for all platforms.
What if a new platform comes up?
Simple, Build an archive for that platforms for all compiler versions.
Does it sound viable to maintain the library?
Is there any alternative? What does commerical vendors do?
Simple. Supply source code. Most vendors do.
Discussion thread at comp.lang.c++.moderated :
Distributing C++ libraries and name mangling
Comments