Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am having an issue with a project that I am working on. Despite the fact that the code is right, I can't build it because I got the following error

Error D8016 '/ZI' and '/Gy-' command-line options are incompatible LoadReport C:\LoadReport\LoadReport\cl

My version of the visual studio is 2015. Any idea would be appreciated.

like image 331
dim mik Avatar asked Mar 31 '17 13:03

dim mik


3 Answers

In the Configuration Properties (Project ➔ Properties),

"/ZI" is in

C/C++ ➔ General ➔ Debug Information Format 

"/Gy" is in

C/C++ ➔ Code Generation ➔ Enable Function-Level Linking
like image 90
Pierre Avatar answered Oct 24 '22 09:10

Pierre


You are choosing "Edit and Continue" (/ZI) to be able to fix code during debugging, but also "Disable Function-Level Linking" (/Gy-).

Those two will not work together, as you cannot just change one function in the middle of the code. So just choose one of them, like changing /Gy- to /Gy.

like image 33
Bo Persson Avatar answered Oct 24 '22 09:10

Bo Persson


the same issue got, resolved by changing

Project ➔ Properties ➔ C/C++ ➔ General ➔ Debug Information Format ➔ Program Database (/Zi)

like image 14
N.SANDEEP REDDY sandeep Avatar answered Oct 24 '22 08:10

N.SANDEEP REDDY sandeep