Link.exe crashes with a fatal LNK1000 error when you use /WHOLEARCHIVE switch
This article helps you resolve the problem that link.exe crashes with a LNK1000 error when you use /WHOLEARCHIVE switch.
Original product version: Visual Studio 2015
Original KB number: 4020481
Symptoms
If you use the /WHOLEARCHIVE switch together with link.exe in Microsoft Visual Studio 2015, you receive an error message that resembles the following:
LINK : fatal error LNK1000: unknown error at 000000013FA24241; consult documentation for technical support options
Cause
This problem occurs in rare cases because link.exe might not handle import objects and incremental linking correctly if it uses the /WHOLEARCHIVE switch.
Resolution
The following file is available for download from the Microsoft Download Center:
Download the hotfix package now
For more information about how to download Microsoft support files, see How to obtain Microsoft support files from online services.
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
Prerequisites
To apply this hotfix, you must have Visual Studio 2015 Update 3 installed.
Restart requirement
You may have to restart the computer after you apply this hotfix if no instance of Visual Studio is being used.
Hotfix replacement information
This hotfix doesn't replace other hotfixes.
References
For more information about the /WHOLEARCHIVE switch, see /WHOLEARCHIVE (Include All Library Object Files).
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for