Error 1 error D8016: '/ZI' and '/clr' command-line options are incompatible

Nov 11, 2015 at 8:23pm
Hi,

The current project which I am working on has the following error when I try to build it.

Error 1 error D8016: '/ZI' and '/clr' command-line options are incompatible

Can anyone please explain what the problem may be?

Kind Regards

Nov 11, 2015 at 8:34pm
The error message seems quite self-explanatory. The compiler command line options /ZI and /clr can't be used together. Did you read the documentation for that error: https://msdn.microsoft.com/en-us/library/t0cs92zx.aspx

How are you trying to compile your program?

If you're using Visual Stdio, what is the exact version?

What type of program are you trying to write C++, C, C++/CLI, C#, etc.

Nov 11, 2015 at 8:41pm
I'm trying to write a C++ program using visual studio 2013.

I'm just using the debug tool in visual studio.

Nov 11, 2015 at 8:57pm
How did you create your project? This error message is usually caused by selecting incompatible project options. For a C++ program you probably need to select a Win32 console application and make sure you don't select anything to do with .NET or CLI.

The above is only a guess since I don't use that compiler and I don't do Windows.
Nov 11, 2015 at 9:47pm
I've tried using win32 project, win32 console application. I have no idea what is wrong.

I am only trying to use the System namespace.
Nov 11, 2015 at 9:55pm
I am only trying to use the System namespace.

That means that you're not trying to write a standard C++ program because the "System namespace" is not part of the C++ standard. It is part of one of the .NET languages, like C# or C++/CLI.
Topic archived. No new replies allowed.