I dont think my question here was answered here already. So here it is, I have a static library that I maintain and update periodically. I also update the version number correctly. Now my application which uses this library must link to exactly the same version of the library and not to the older or newer ones. One thing I tried was to use predefined macros in the libraries header file and check it in my application. It worked, but in that way you can only ensure the correct header files. Is there any technique so that the linking will fail if it is the wrong library?? I hope the question is somewhat clear.
Hari
All you need is a unique symbol related to the version number for example:
int version_1_1_5=0;
in the library and some use of it in the application, for example:
extern int version_1_1_5; //decl
int *p = &version_1_1_5; // use
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