Problem: Building a VC++ DLL returns error LNK1189 when there are too many exports
| Article ID | : | 949945 |
| Last Review | : | March 4, 2008 |
| Revision | : | 1.1 |
RAPID PUBLISHING
Action
Create a C++ DLL project. Try to export more than 64K (65,536) functions, classes and members of classes from it. Now build this project.
Result
While building the C++Â DLL project, it throws LNK1189 error.
The exact error message is …..The limit of 65535 objects or members in a library has been exceeded.
Â
Cause
In the MSDN Library, this error message has the following description:
LIBTOOMANYMEMBERS:: library limit of number objects exceeded
The limit of 65535 objects or members in a library has been exceeded.
64k is the maximum limitation for the library for export symbols. There is no way to go beyond this limit.
It’s a expected behavior and built into the format of a library; a limitation from the compiler for DLLs.
Resolution
The only possible resolution is to have a lesser number (less than 64K) of exports from the library.
Consider dividing the DLL into two (or more) to limit the number of exports in each to less than 64K.Â
More Information
DISCLAIMER
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
APPLIES TO
| • | Microsoft Visual Studio .NET (2003), Academic Edition |
| • | Microsoft Visual Studio .NET 2003 Professional Edition |
| • | Microsoft Visual Studio .NET 2003 Enterprise Architect |
| • | Microsoft Visual Studio .NET 2003 Enterprise Developer |
| • | Microsoft Visual Studio 2005 Standard Edition |
| • | Microsoft Visual Studio 2005 Professional Edition |
| • | Microsoft Visual Studio 2005 Team Suite |
| • | Microsoft Visual Studio 2008 Academic Edition |
| • | Microsoft Visual Studio 2008 Standard Edition |
| • | Microsoft Visual Studio 2008 Professional Edition |
Keywords:Â |
kbnomt kbrapidpub KB949945 |
Microsoft Knowledge Base Article.This article contents is Microsoft Copyrighted material.
2005-2007 Microsoft Corporation. All rights reserved.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Back to the top
Leave a Reply