小编F. *_*aaf的帖子

如何处理Visual Studio中的第三方C ++库LNK4099警告

我有一个Visual Studio c ++项目,在其中使用链接器设置

/WX (TreatWarningsAsLinkerErrors=true)
Run Code Online (Sandbox Code Playgroud)

在Debug中,我使用/ Zi(调试数据库)进行编译,效果很好。

现在,我有一个第三方SDK,它带有一个静态库,但是没有.pdb文件。在Debug中链接此文件后,

LNK4099: 3rd-party.lib(3rd-party.obj) : warning LNK4099: PDB "vc90.pdb" was not found "3rd-party.lib(3rd-party.obj)" or with "C:\OutDir\vc90.pdb"
Run Code Online (Sandbox Code Playgroud)

请注意,此消息具有误导性,因为将vc90.pdb放在3rd-party.lib旁边不能解决问题,因为该3rd-party lib的源代码和pdb不可用,因此链接器仍然会抱怨。

为了摆脱此链接器警告,我在这里有哪些选择?

c++ debug-symbols static-linking visual-studio

5
推荐指数
0
解决办法
1415
查看次数