PDB 'vc100.pdb' was not found with

2019-01-23 12:06发布

问题:

I have downloaded the FreeImage source code and done a static build myself for X64 MT DLL.

Everything works fine, except when I use link in the freeimage.lib file I get a lot of annoying linker warnings which I don't quite understand the cause for?

2>freeimage.lib(zutil.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'freeimage.lib(zutil.obj)' or at '\bin\Release\vc100.pdb'; linking object as if no debug info

... and it continous like that...

What is causing this and how do I get rid of it? I'm guessing it's some compiler option when I build FreeImage.

Here is the command line for the FreeImageLib project:

/I"..\" /I"..\ZLib" /I"..\DeprecationManager" /I"..\OpenEXR\Half" /I"..\OpenEXR\Iex" /I"..\OpenEXR\IlmImf" /I"..\OpenEXR\Imath" /I"..\OpenEXR\IlmThread" /nologo /W3 /WX- /Od /D "WIN32" /D "_DEBUG" /D "OPJ_STATIC" /D "FREEIMAGE_LIB" /D "_CRT_SECURE_NO_DEPRECATE" /D "LIBRAW_NODLL" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF- /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /openmp /Fp".\Debug/FreeImageLib.pch" /Fa".\Debug/" /Fo".\Debug/" /Fd".\Debug/" /Gd /errorReport:queue

EDIT:

I solved it by building it as a dynamic library instead. Though that is not the solution I had hoped for...

回答1:

When you compile a static library with debug symbols, you get this file, vc100.pdb, along with the library. The symbolic information in this file will be merged with that of other libraries during linking, to produce the final PDB for the EXE or DLL you are linking. The linker is complaining that it cannot find this file where it expects it to be found.

It's only a warning, and it will only happen in debug builds. If you compile FreeImage in release configuration, this warning should go away. Or, figure out why the linker isn't finding the vc100.pdb file.

The other answer that has been given to you is insane nonsense.