0

Our windows builds generate hundreds of warnings of this form:

LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification

I would like to disable this warning, at least temporarily, to make it easier to spot and resolve other warnings.

I've seen Visual C++: How to disable specific linker warnings? which suggests that I should be able to set /ignore:4075, but am unsure which qmake variable should I add that to?

I've looked at the variables in the qmake Variable Reference, and there are plenty of LFLAGS-related options, and without a large amount of trial and error, I'm unsure which to use.

So, what qmake variable should I adjust, with what value, to turn off LNK4075?

Community
  • 1
  • 1
Clare Macrae
  • 3,473
  • 2
  • 26
  • 42

1 Answers1

0

Which of the LFLAGS you use depends on what you are building.

  • Windows Console (no GUI) App => QMAKE_LFLAGS_CONSOLE
  • Windows Console (no GUI) DLL => QMAKE_LFLAGS_CONSOLE_DLL
  • Windows GUI app => QMAKE_LFLAGS_WINDOWS
  • Windows GUI DLL => QMAKE_LFLAGS_WINDOWS_DLL

To use them, just add the flag you need to the appropriate one.

QMAKE_LFLAGS_xyzzy += /ignore:4075

If you are really in doubt, add it to all of them.

jwernerny
  • 6,739
  • 2
  • 27
  • 31
  • Thank you. I tried adding ` /ignore:4075` to all 4 of those variables, as suggested. It did add that option to the .vcxproj file, but sadly Visual Studio still generates the `LNK4075` warnings. I guess that means there's no way to disable that warning any more. Thanks anyway. – Clare Macrae Sep 02 '12 at 10:24