How to Fix Visual Studio Bug: "’/RTC1′ and ‘/clr’ Options are Incompatible"
Posted by gregd1024 on December 31, 2007
Have you ever received this error when converting a native C++ project to MC++?
1>cl : Command line error D8016 : ‘/RTC1’ and ‘/clr’ command-line options are incompatible
While, yes, it’s true that ‘/RTC1’ (basic runtime checking) with ‘/clr’ (.NET support) are incompatible options, the problem is there’s no place in the Visual Studio IDE to turn off ‘/RTC1’ once it’s set (not even from the command line editor). The Project Settings dialog just lists different modes of runtime checking without a “disable” option:
In order to fix this problem, follow these steps:
- Open up your “vcproj” file in a regular text editor.
- Search for all the strings that look like:
- Replace all instances with this string:
In your project file the “BasicRuntimeChecks” variable may not necessarily equal “3.” It just happened to be the default in my project. Whatever number appears as your default just replace it with “0” and that should fix the problem.