1

I have simple question related to LIB command I have one sum.cpp file which contains one function add(int,int). Now library name a.lib depends on sum.obj file and one another library name b.lib which depends upon a.lib and sum.obj

so scenario is

a.lib: sum.obj

b.lib : sum.obj a.lib

everything works fine but my doubt is why lib command not issuing duplicate warning or error.

  • It could generate a diagnostic or simply do what you asked it to do. It isn't obvious what tool-chain you are using. Mine says "Replacing sum.obj" and generates a happy b.lib. Well, it does have a 1-800 support phone number. Yours is perhaps used by programmers that don't do illogical things. Or just don't notice, you won't get a linker error. – Hans Passant Mar 01 '19 at 13:52

0 Answers0