When Building a .lsb File, '/O2' and '/RTC1' Command Line Options Are Incompatible

Updated Dec 21, 2017

Issue Details

I'm trying to build a .lsb file in Visual Studio 2005 as indicated in the Creating a CIN Project in Visual Studio .NET 2003 tutorial but I'm getting the following message: 

Command line error D8016 : '/O2' and '/RTC1' command-line options are incompatible. 

What am I doing wrong?

Solution

This message appears due to some of the project's properties. Since O2 optimization is incompatible with RTC1, you must verify this setting and try disabling it if it is enabled.

To do this, in Visual Studio go to your Project » Properties (For Debug Configuration):

In the Configuration Properties » C/C++ » Optimization tab set the value of "Optimization" to "Disable (/Od)"

For some additional information on this error please see this link to MSDN.

WAS THIS ARTICLE HELPFUL?

Not Helpful