PRB: Extra Copies of Function Added to Library (113065)
The information in this article applies to:
- The Library Manager (LIB.EXE), when used with:
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 5.0
This article was previously published under Q113065 SYMPTOMS
If a function is contained in a library being added to another library, and
that function already exists in the library being added to, LIB.EXE adds it
anyway. The following warning is generated:
LNK4006: <function name> already defined in <library name>
<object module name>; second definition ignored
The .OBJ file is added to the library, and can be added multiple times.
CAUSE
This behavior is by design.
RESOLUTION
If you add an object module that is already in the library, the new object
module replaces the old one. However, if you combine libraries, they are
always combined because there could be similarly named object modules in
several different libraries that don't have any of the same functions. The
above warning is generated to indicate conflicting function names.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbprb KB113065 |
---|
|