When I create a library on Linux, I use this method:
The versioning is so that if you change the public facing methods, you can build to libhelloworld.so.2.0.0 for example (and leave 1.0.0 where it is), so that applications using the old library won't break.
However, what's the point in naming it 1.0.0 - why not just stick with libhelloworld.so and libhelloworld.so.1?
Also, is it best practice to name your library using 1.0.0 for example, or just 1?
g++ ... -Wl,-soname,libhelloworld.1
Or:
g++ ... -Wl,-soname,libhelloworld.1.0.0
The way you're supposed to form the x.y.z version is like this:
So the x and z numbers are very important for the system to determine if a given app can use a given library, given what the app was compiled against. The y number is mainly for tracking bug fixes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With