Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix LNK4204, or get rid of it?

I'm statically linking SFML2.3 into my application. When linking in debug mode, I get a huge wall of warnings, all of them like this:

1>sfml-graphics-s-d.lib(View.obj) : warning LNK4204: 'D:\DATA\Libraries\Programming\SFML Projects\SimpleAdventure\Debug\vc120.pdb' is missing debugging information for referencing module; linking object as if no debug info

But for different objects in different modules of SFML.

I compiled SFML, in the lib/debug folder there are pdb's for each of the libs. I tried copying them to my project's outputpath too, but the result is the same. I can't find any information on how to properly handle this. I don't want to compile my project without debug info, as was suggested somewhere, but I don't care about these libs.

Turning the warning off with /ignore:4204 does not work either because it's on some list of not ignorable warnings for some reason.

Any insight would be appreciated!

EDIT I ended up recompiling all libraries metioned by the warnings with Z7, as to embed the debug info in the libs themselves. This removed all warnings. But I still do not understand why separate pdb's were an issue all of a sudden.

like image 869
DSPC Avatar asked May 28 '15 21:05

DSPC


1 Answers

I ended up recompiling all libraries metioned by the warnings with Z7 (Properties -> C/C++ -> Debug Information Format), as to embed the debug info in the libs themselves. This removed all warnings.

like image 69
DSPC Avatar answered Oct 19 '22 09:10

DSPC