开发者

same file in static lib and project

开发者 https://www.devze.com 2023-02-17 05:53 出处:网络
I have a static singleton, logger-class (if you like it or not), that I use in all of my projects. I have made static library that is also using that singleton, logger-class, let\'s say a half year
  • I have a static singleton, logger-class (if you like it or not), that I use in all of my projects.
  • I have made static library that is also using that singleton, logger-class, let's say a half year ago. I made quit some changes to the mentioned logger-class in the meantime, but I didn't update the static lib.
  • Now I started a new project that uses the lib and the latest(!) logger-class. However I don't want to update the lib, because then I would have to go through all my project and check if they are still working.

So my question is: Can it cause a confli开发者_如何学编程ct, if I have two different versions of a class in my static lib and my actual project, especially if its static stuff? And if so, can that conflict be eliminated by using a namespace for the static lib-stuff? I hope this is clear enough to understand...

Thanks in advance.

EDIT:

Please let me know if anything is unclear, which seems to be the case since I don't get any answers.


I'm not sure I understand the problem fully, but you can consider naming the new version of your library differently (using a version number for example). This way, you don't change anything to your existing projects, but you link the new ones with the latest version of your lib.

0

精彩评论

暂无评论...
验证码 换一张
取 消