1>cl: 命令行 error D8045 :不能使用 /clr 选项编译 C 文件“.\JoyStickPlugIn_i.c”
1>项目 : error PRJ0002 : 错误的结果 2 (从“F:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe”返回)。
------解决方案--------------------------------------------------------
clr 应该不支持c
------解决方案--------------------------------------------------------
估计是楼主配置的问题,再仔细看看吧,我clr控制台程序就没问题,楼主看看项目的属性配置有没有地方没有修改
------解决方案--------------------------------------------------------
cannot compile C file 'file' with the /clr option
Only C++ source code files can be passed to a compilation that uses /clr. Use /TP to compile a .c file as a .cpp file; see /Tc, /Tp, /TC, /TP (Specify Source File Type) for more information.
For more information, see /clr (Common Language Runtime Compilation).
D8045 can also occur if you compile an ATL application using Visual C++ 2005. See How To: Migrate to /clr for more information.
来自:
http://msdn.microsoft.com/en-us/library/abb82cy0(v=vs.80).aspx