Link error: fatal error LNK1285: corrupt PDB file 'xxx.pdb'; delete and rebuild


Problem : DPD200049849-Link error "fatal error LNK1285: corrupt PDB file 'xxx.pdb'; delete and rebuild"


Environment : Windows* IA32 or Intel® 64 Operatin System; Intel C++ Compiler 10.1.029 or older, Intel C++ Compiler 11.0.066 or older; Intel Parallel Composer beta update3; Microsoft* Visual C++ 2008*


Root Cause : 
It is a bug in the compiler and has been fixed. The fix should be in the next compiler update of 10.1.029 and 11.0.066, Parallel Composer beta update3.

It happens when you have a library that is built with Intel C++ Compiler & "/Zi" and library contains code using any similar enum type like the "IPPVC_EDGE_HALF_1" in IPP "ippvc.h"; and then when you create a DLL or program using Intel C++ Compiler with "/Zi" and the library, you will get this link error.

The problem is related to generate debug information for the anonymous enum type names.


Resolution :
The fix for this issue is in the Intel C++ Compiler for Windows update 10.1.030, 11.0.072, and Intel Parallel Composer product RTM or newer.

Use the compiler update with the fix or modify the code to work-around the problem by changing
the enum in ippvc.h below:

/* enum used in VC1 deblocking and smoothing */
enum
{
IPPVC_EDGE_QUARTER_1 = 0x01,
IPPVC_EDGE_QUARTER_2 = 0x02,
IPPVC_EDGE_QUARTER_3 = 0x04,
IPPVC_EDGE_QUARTER_4 = 0x08,
IPPVC_EDGE_HALF_1 = IPPVC_EDGE_QUARTER_1 + IPPVC_EDGE_QUARTER_2,
IPPVC_EDGE_HALF_2 = IPPVC_EDGE_QUARTER_3 + IPPVC_EDGE_QUARTER_4,
IPPVC_EDGE_ALL = IPPVC_EDGE_HALF_1 + IPPVC_EDGE_HALF_2
};
to
/* enum used in VC1 deblocking and smoothing */
enum
{
IPPVC_EDGE_QUARTER_1 = 0x01,
IPPVC_EDGE_QUARTER_2 = 0x02,
IPPVC_EDGE_QUARTER_3 = 0x04,
IPPVC_EDGE_QUARTER_4 = 0x08,
IPPVC_EDGE_HALF_1 = 0x03,
IPPVC_EDGE_HALF_2 = 0x0c,
IPPVC_EDGE_ALL = 0x0f
};
有关编译器优化的更完整信息,请参阅优化通知