At the beginning of last week's sprint, I picked up a task to reduce our warning count. One of the issues that I scratched my head over a couple minutes was a bunch of warnings with the text warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SomeOtherSetting' specification. As indicated by the LNK identifier, I knew the linker emitted this warning. However, in my perusal of the linker options, I couldn't find where the EDITANDCONTINUE setting existed. I even glanced through the other property pages looking for it.
Per my wont, I searched the web and eventually found it based on some oblique references on a StackOverflow question. The reason I had trouble finding it? It's a compiler option. And it's not called EDITANDCONTINUE.
This is controlled by the Debug Information Format setting on the C/C++ General page. If the option is Program Database and Edit and Continue, a.k.a. /ZI, then the output obj files apparently have a flag embedded in them that is incompatible with certain settings in the linker. Hence, the linker emits the warnings when it hits these conditions. It would have been nice for the message to have contained the /ZI option (which is what's used in the compiler) rather then than the EDITANDCONTINUE pseudo-option which isn't used anywhere, as near as I can tell.
To fix this warning, either change the linker options that are incompatible with the /ZI option or change the compiler option to something other than /ZI, such as /Zi. As of the time of this writing, the linker options incompatible with EDITANDCONTINUE include setting optimization to /OPT:REF or /OPT:ICF, turning off incremental compilation or setting one of /ORDER, /RELEASE or /FORCE. (These are from this MSDN page.)
Hope this helps someone.
Welcome and thanks for visiting! You might be interested in subscribing to our RSS or Twitter article feeds.
If you prefer e-mail, you can subscribe by putting you e-mail here. This is never used for anything but letting you know when articles are published and you can opt out at any time.
If you prefer e-mail, you can subscribe by putting you e-mail here. This is never used for anything but letting you know when articles are published and you can opt out at any time.
Welcome back! We're so glad you enjoy our writing. If you especially like a particular article, please consider sharing it using the button at the bottom of each article. Thanks!
Tuesday, September 27, 2011
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks for the insightful post. It was instructive and cogent in understanding as well as implementation.
Post a Comment