PRB: Unresolved Externals Remain When Libraries Share a Name (78930)



The information in this article applies to:

  • Microsoft LINK for MS-DOS 3.x
  • Microsoft LINK for MS-DOS 4.x
  • Microsoft LINK for MS-DOS 5.0x
  • Microsoft LINK for MS-DOS 5.1x
  • Microsoft LINK for MS-DOS 5.2
  • Microsoft LINK for MS-DOS 5.2x
  • Microsoft LINK for MS-DOS 5.5
  • Microsoft LINK for MS-DOS 5.6
  • Microsoft LINK for OS/2 5.0x
  • Microsoft LINK for OS/2 5.1
  • Microsoft LINK for OS/2 5.11
  • Microsoft LINK for OS/2 5.13
  • Microsoft LINK for OS/2 5.15

This article was previously published under Q78930

SYMPTOMS

An attempt to link an application fails and Microsoft LINK generates the following message:
LINK : error L2029: 'symbol' : unresolved external

CAUSE

The application is linked to more than one library that have the same name but that are stored in different directories. LINK searches for symbols only in the first library with the listed name. This calls all symbols referenced in the other libraries to remain unresolved.

RESOLUTION

To work around this problem, change the names of the libraries such that each one has a unique name.

STATUS

Changing this behavior is under review and will be considered for a future release of Microsoft LINK.

MORE INFORMATION

The following linker response file demonstrates this situation. All symbols referenced in the TEST.LIB file in the \LIB2 directory remain unresolved. Changing the name of at least one of the two libraries addresses this situation.

TEST.LRF

TEST.OBJ
TEST.EXE
TEST.MAP
\LIB1\TEST.LIB +
\LIB2\TEST.LIB


Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kb16bitonly KB78930