我可以为禁用预编译头吗.C++项目中的C文件?
当我想要将.c文件添加到我的程序中,用于脚本虚拟机/抽象机时,我收到这些错误,该脚本虚拟机位于C:
错误1错误C1853:'Release\pluginsa.PCH的预编译头文件来自编译器的前一版本,或者预编译头为C++,并且使用C(或反之亦然)Z:\Prrase\Raval\Tabe\SAMOD\Soo\Ax\AMX.c 1 pluginsa
所有其他内容都是C++,并使用我的预编译头文件.
我可以为禁用预编译头吗.C++项目中的C文件?
当我想要将.c文件添加到我的程序中,用于脚本虚拟机/抽象机时,我收到这些错误,该脚本虚拟机位于C:
错误1错误C1853:'Release\pluginsa.PCH的预编译头文件来自编译器的前一版本,或者预编译头为C++,并且使用C(或反之亦然)Z:\Prrase\Raval\Tabe\SAMOD\Soo\Ax\AMX.c 1 pluginsa
所有其他内容都是C++,并使用我的预编译头文件.
In the Solution Explorer window right click on the *.c file(s) and select Properties. Go to C / C++ -> Precompiled Headers and set the Precompiled Header option to Not Using Precompiled Headers.
此外,除非您确实需要预编译头文件,否则我建议您在整个项目范围内将其关闭.
Another option would be to compile your C files as C++ and keep using the precompiled headers. To do that, right click on the project name (or each .c file name), and set C / C++ -> Advanced -> Compiles As to Compile as C++ code.