I wonder how to handle the following situation correctly:
- TheLibrary.LIB file containing classes A, B
- First.DLL uses class A, so it communicates with TheLibrary.lib
- Second.DLL uses the code in First.DLL and class A and class B, so it associates with First.DLL AND TheLibrary.lib
The result (as expected) is that class A has several definitions (TheLibrary.lib and First.lib)
The question is, what is the right way to deal with this situation ???
I can come up with several options that I am not happy with any of them:
- Force Second.DLL to communicate using the first character found (/ FORCE: MULTIPLE)
- Make First.dll to use class B, so it will be inside First.lib. So Second.lib does not need to bind to TheLibrary.lib
- Turn TheLibrary.lib into a DLL, but suppose this is what I really want to avoid.
source
share