Reputation: 415
I'm trying to build Qt using nmake
. But when I try this I get the below linking error.
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
As far as I know this is due to the .NET framework version (I'm using .NET 4.5) and I get the same linking error when I'm compiling c++ projects in VS2010. To get rid of it, I disable incremental linking as suggested in this post.
But I don't know how to do it when I'm running nmake
from the VS command line. Do I have to mention it while configuring or can i pass it as a parameter to nmake ?
Upvotes: 1
Views: 2326
Reputation: 53155
This is a linker flag, so you would need to pass it to your linker rather than "nmake". That is, in your Windows makefile when building from command line, you will need to find the linker invokation and pass the argument in there. Pseudo code follows:
foo: $(LD_COMMAND) /INCREMENTAL:NO
What you could is open up a qmake project file and write this:
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
Then, you could invoke the qmake command, and see the Makefile generated. Look for "/INCREMENT:NO" then, and the same way, you would need to put it into your Makefile if you create it in a different way.
Otherwise, it will just work if you qmake for the Makefile generation, provided you are picking up the appropriate spec file for your toolchain and environment.
Upvotes: 1
Reputation: 1205
According to mkspecs/win32-msvc2010/qmake.conf
of both Qt 4 and 5 QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
is already there. So you are facing some other problem in case you are compiling Qt in release mode.
Upvotes: 0