You may receive a “warning LNK4018” warning message when you link a debug version of your application in Visual C++

When linking a debug version of your application, you may get the following warning message:

LINK : warning LNK4018: too many type indexes in PDB “filename”, discarding subsequent type information

NOTE: You will not be able to see the subsequent types in the debugger.


The number of type indexes in the Program Database File (.pdb file) for your project exceeded 64K for Visual C++ 4.x and 16M for later versions. This is a limitation of the debugging format in a .pdb file. The format uses a 16-bit field to store the number of types. This field was increased to 24 bits in Visual C++ 5.0.


To avoid this warning, use one or more of the following methods to decrease the number of type indexes in your .pdb file:

    Compile modules that you do not need to debug, without debugging information.
      Break your project into multiple Dynamic Link Libraries (DLLs). You can use subprojects in Developer Studio to build the new libraries.
        Use the compile time option /Yd. It will cause the type information for only those symbols that are referenced to be generated. This slows down builds somewhat but may lower the total number of symbols below the 64K limit.

        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.

        AddThis Social Bookmark Button

        Leave a Reply

        To prove that you're not a bot, enter this code
        Anti-Spam Image