简体   繁体   中英

Suppress LNK4204 Warning

I'm stumped on how to suppress a flood of LNK4204 warnings for a vc110.pdb file in my VS2010 project. I've tried the /IGNORE approach, but after many attempts and extensive searching it appears that VS does not allow LNK4204 to be suppressed that way. Rebuilding the libraries in question to get the correct PDB files is not an option in my case.

Is there any way in the world to suppress this particular warning?

I had the same problem with a few projects in vc12. I noticed that there were two *.pdb being produced.

(A) Properties > C/C++ > Output Files > Program Database File Name was set to $(IntDir)$(TargetName).pdb

(B) Properties > Linker > Debugging > Generate Program Database File was set to $(IntDir)

Changing the latter (B) to $(IntDir)$(TargetName).pdb produced a single PDB, and the LNK4204s became LNK4099s which can be suppressed by adding /ignore:4099 under Properties > Linker > Command Line

Note: setting the former (A) to $(IntDir) (matching B) did not help unless the latter (B) is set explicitly (eg to $(IntDir)vc120.pdb - substitute vc120 for your version of visual studio)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM