[C.C++] C语言出现错误c1853,如何用vs编译c语言,compiler error C1853

386 0
Honkers 2025-6-4 08:07:31 | 显示全部楼层 |阅读模式

这里犯得错误是使用c++的预编译头去编译c语言。

如果解决C1853这个错误呢?

其实就是对每一个.c文件加上

#include "stdafx.h"

然后把.c文件改为.cpp文件

然后在把工程属性中的

configuration properties中的c/c++中的Precompiled Header中的Create / use Precompile Header 中的User precompile Header 改为

Create precompile Header

How to compile C programs with Microsoft Visual C++ 2005

By default, new applications created in Microsoft Visual C++ 2005 Express edition create C++ source code.

Here is how to compile C code. Launch Visual C++ 2005 Express Edition and create a new project. Choose Win 32 and Win 32 Console Application. Enter a name in the Name box below.

Now press the Next button and then the Finish button. This will generate a file called name.cpp where name is your entered project name. Now look to the Solution Explorer (if you can't see it, click View on the menu th

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Honkers

荣誉红客

关注
  • 4014
    主题
  • 36
    粉丝
  • 0
    关注
这家伙很懒,什么都没留下!

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行