Tuesday, October 20, 2020

LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification

LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification

    good posts with personal thoughts and understanding

  1. LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
  2. How to fix Visual Studio C++ Warning: LINK4075
  3. Supported Code Changes (C++)
  4. Supported Code Changes and Limitations (C++)

  5. LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
  6. 42 You can either have "Edit and continue" support or optimizations. Usually, you put "Edit and continue" on debug builds, and optimizations on release builds. Edit and continue allows you to change code while you are debugging and just keep the program running. It's not supported if the code also has to be optimized.

  7. /SAFESEH disables Edit and Continue? RRS feed
  8. It's a documentation bug, I annotated the MSDN article. It makes sense, /SAFESEH generates stack unwinding info in a table rather than using the stack. That's incompatible with Edit+Continue's need to move code around into empty spots of the image, it's not smart enough to update the table.

    The workaround is simple, /SAFESEH makes no sense in the debug build. Only use that linker option in the Release build.

    Like Hans Passant pointed out, the option to turn SAFESEH off is project properties >> Configuration Properties >> Linker >> Advanced. The last option there 'Image Has Safe Exception handlers'

  9. Warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
  10. #visual studio compilation # warning LNK4075: ignoring '/ EDITANDCONTINUE' due to '/ SAFESEH' specification

No comments:

Post a Comment