C++ 未找到 PDB 'vc100.pdb'

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8460623/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 18:36:18  来源:igfitidea点击:

PDB 'vc100.pdb' was not found with

c++visual-studio-2010linkerwarningsstatic-linking

提问by ronag

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

我已经下载了 FreeImage 源代码并自己为 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?

一切正常,除了当我在 freeimage.lib 文件中使用链接时,我收到很多烦人的链接器警告,我不太明白原因?

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.

是什么导致了这种情况,我该如何摆脱它?我猜这是我构建 FreeImage 时的一些编译器选项。

Here is the command line for the FreeImageLib project:

这是 FreeImageLib 项目的命令行:

/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

/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 "_D​​EBUG" /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 /Z /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...

我通过将其构建为动态库来解决它。虽然这不是我希望的解决方案......

回答by brewbuck

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.

当您使用调试符号编译静态库时,您将获得此文件 vc100.pdb 以及该库。此文件中的符号信息将在链接期间与其他库的符号信息合并,以生成您正在链接的 EXE 或 DLL 的最终 PDB。链接器抱怨它无法在它期望找到的地方找到这个文件。

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.

这只是一个警告,它只会在调试版本中发生。如果您在发布配置中编译 FreeImage,此警告应该会消失。或者,找出链接器找不到 vc100.pdb 文件的原因。

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

给你的另一个答案是疯狂的废话。