cl : Command line error D8016 : '/RTC1' and '/clr' command-line options are incompatible

来源:互联网 发布:avr单片机教程pdf 编辑:程序博客网 时间:2024/05/21 09:08

 (3)选中Reference.CPP.右键点击选中Propertise。在C/C++ item 下的General,找到 Compile with Common Language Runtime support,选择 Common Language Runtime Support(/clr),(注意不要选择为 Common Language Runtime Support, Old Syntax (/clr:oldSyntax),这是旧语法,两个有好多不同);
   

 

 (4)单独编译Reference.cpp.编译器提示错误 “cl : Command line error D8016 : '/RTC1' and '/clr' command- line options are incompatible”这句提示是说两个发生矛盾。 再打开Reference.cpp 文件的 Properties属性,在C/C++ -> CodeGeneration下找到Basic Runtime Checks 属性 现在为(Both (/RTC1, equiv. to /RTCsu))所以发生错误。现在改为:Default;再单独编译Reference.cpp.编译器提示错误"Command line error D8016 : '/Gm' and '/clr' command- line options are incompatible".同样的办法。在properties里去找该为NO。现把所有的错误列于下面:
    A:“Command line error D8016 : '/Gm' and ' /clr' command-line options are incompatible” 改 properties -> C /C++ -> Code Generation -> Enagle minimal Rebuild 为No。
    B:“error D8016 : '/EHs' and ' /clr' command-line options are incompatible”改 properties -> C /C++ -> Code Generation -> Enable C++ Exceptions 为No。
    D: "D8016 : '/ZI' and ' /clr' command-line options are incompatible"改 properties -> C /C++ ->General -> Debug Information Format 为Disabled

        注意:E:"error C2855: command- line option '/clr' inconsistent with precompiled header" 改 properties -> C/C++ -> Precompiled Headers -> Create /Use Precompiled Header 为 Not Using Precompiled Headers"。
    改完以上的错误再编译Reference.cpp. Compiled succeeded;

 

 

参考资料:

 

http://www.programfan.com/club/showtxt.asp?id=178540

原创粉丝点击