Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio error D8016: '/ZI' and '/O2' command-line options are incompatible

Visual Studio error D8016: '/ZI' and '/O2' command-line options are incompatible

I'm using optimization for the first time with C++. When I 'build solution' I keep getting this error. In the property pages, I have configuration set to Release Under project/properties/c++/optimization I tried all the options except for disable. Under project/properties/c++/General I also tried all the options under 'Debug Information Format' (assume 'None' is a good choice?). I think it might have something to do with the linker settings, but still don't know what to do.

like image 933
Nathan Schmidt Avatar asked Mar 30 '15 00:03

Nathan Schmidt


2 Answers

Go to the project's property page and change the value for:

C/C++ | General | Debug Information Format

To something other than "Program Database for Edit and Continue (/ZI)"

For example, "Program Database (/Zi)" should work.

like image 63
Michael Burr Avatar answered Oct 01 '22 06:10

Michael Burr


After changing

C/C++ | General | Debug Information Format

to Program Database (/Zi)

You might need to set the solution configurations to Release.

like image 39
Ismail Elouafiq Avatar answered Oct 01 '22 04:10

Ismail Elouafiq