Mark
Mark

Reputation: 6351

LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification

I recently converted a multi-project Visual Studio solution to use .dlls instead of .libs for each of the projects. However, I now get a linker warning for each project as stated in the example. MSDN didn't serve to be all that helpful with this. Why is this and how can I solve it?

Warning 2 warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification LudoCamera.obj

Upvotes: 56

Views: 72450

Answers (7)

Andrew Morris
Andrew Morris

Reputation: 81

You can also get this error if you've accidentally added a debug directory into your release build. Check Linker->General->Additional Library Directories. Worked for me.

Upvotes: 0

ulatekh
ulatekh

Reputation: 1500

We had to set "Generate Debug Info" to "Yes (/DEBUG)" under the project properties' Linker->Debugging pane. Not sure how that wasn't set for a debug build in the first place, or why that wouldn't be the default, but there you go. (VS2010, in case that's relevant.)

Upvotes: 0

Richard
Richard

Reputation: 419

I had this problem too. I opened the Project Properties, and then clicked General in the C/C++ tab. There is an option that says 'Debug Information Format', which I changed to Program Database (/Zi), and I didn't get the warning anymore.

Upvotes: 30

Penny
Penny

Reputation: 656

you should set BOTH projects 'Debug Information Format' as 'Program Database(/Zi)'. Eg. If the warning is :

warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification D:\mypath\project1\project1.obj project2

Then in BOTH project1 and projects's properties. Set them as:

project properties->Configuration Properties->C/C++->General->Debug Information Format, set it as ‘Program Database(/Zi)’;

Upvotes: 1

walleball
walleball

Reputation: 71

I also got this warning when converting a VS2008 project from .lib to .dll and the workaround was to change the Linker/Optimization settings on the Debug Win32 configuration from Default to:

References = Keep Unreferenced Data (/OPT:NOREF)

Enable COMDAT Folding = Do Not Remove Redundant COMDATs (/OPT:NOICF)

Upvotes: 7

scope_creep
scope_creep

Reputation: 4251

I know what it is, they dll are not release versions. I think the linker still thinks they are debug builds, which still have the debug edit and continue functionality used when debugging still turned on.

Bob.

Upvotes: 0

Lou Franco
Lou Franco

Reputation: 89232

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.

Upvotes: 46

Related Questions