0

I'm using a jsoncpp library in my visual C++ project(Visual Studio 2017). When I build my project, I'm getting following warning.

1>jsoncpp.lib(json_reader.obj) : warning LNK4099: PDB 'jsoncpp_lib_static.pdb' was not found with 'jsoncpp.lib(json_reader.obj)' or at 'D:\Project\Debug\jsoncpp_lib_static.pdb'; linking object as if no debug info
1>jsoncpp.lib(json_value.obj) : warning LNK4099: PDB 'jsoncpp_lib_static.pdb' was not found with 'jsoncpp.lib(json_value.obj)' or at 'D:\Project\Debug\jsoncpp_lib_static.pdb'; linking object as if no debug info
1>jsoncpp.lib(json_writer.obj) : warning LNK4099: PDB 'jsoncpp_lib_static.pdb' was not found with 'jsoncpp.lib(json_writer.obj)' or at 'D:\Project\Debug\jsoncpp_lib_static.pdb'; linking object as if no debug info

Then, Open Properties => Linker => Command Line and added following line to disable that warning.

/ignore:4099

So, Is is safe to disable that linker warnings?

msc
  • 33,420
  • 29
  • 119
  • 214
  • Build the debug information for open source libraries like jsoncpp or leave that warning there as answer to your next "why the debugger works strangely?" SO question. – Öö Tiib Apr 23 '18 at 11:15

1 Answers1

1

Yes its safe to have no PDB for a library - the code will run fine.

However, debugging functionality (including callstacks) will be impaired - you will not be able to debug anything in jsoncpp or rely on any callstack which relies on jsoncpp functions.

You should really try to get the PDBs for the jsoncpp lib - they are likely to have been built by it as there is really no downside to having them and they enable debugging.

Mike Vine
  • 9,468
  • 25
  • 44
  • 2
    Just an addition/consideration: missing PDBs might indicate trying to link against release libraries in a debug build. This can be safe but can also cause mixing of the debug/release C Runtime support library which is not safe. Best to check why the PDBs are not being found. – Richard Critten Apr 12 '18 at 13:10