How to deal with 3rd party c++ libraries LNK4099 Warning in VisualStudio

偶尔善良 提交于 2019-12-03 08:03:18

Easiest way if you use a VS post 2010 (so 2012/2013/2015) is to add the /ignore:4099 option to the linker. Should ignore this specific warning. Sure that before 2012 this warning was specifically ignored... It existed but was a kind of "yeah but we do not care" warning.

More complex way... If you have the "energy/motivation/advanced user courage/Visual studio 2010 or before [2008/VC6/...]" You can actually extract the symbols used during linking using the lib command lib /list obj.lib. You will obtain a lit of the obj included in the lib, that you can extract with the lib /extact ../path/to/my/obj command. THEN you have to extract the debug section using the dumpbin /section:.debug$ And there you will find the pdb problem... using /fd command you can relink correctly the pdb. It is somehow a lot of work. This is the short summary of what you can find here : https://cldoten.wordpress.com/2009/07/01/vs2008-fixing-the-warning-pdb-vc90-pdb-not-found/ Follow the link I gave carefully.

Obviously the ignore method is probably the easiest and less problematic, especially if you use a lot of third-party libraries.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!