我写了 一个c的test.h 和test.c文件,把它们加到console application中没问题,但是把他们加到带界面的mfc application中就就会报错;
:\documents and settings\administrator\桌面\test.p(7) : fatal error C1010: unexpected end of file while looking for precompiled header directive
你不信可以试验一下
那位知道这是为什么
:\documents and settings\administrator\桌面\test.p(7) : fatal error C1010: unexpected end of file while looking for precompiled header directive
你不信可以试验一下
那位知道这是为什么
解决方案 »
- 请问如何不弹出CPrintDialog对话框,从而设置里面的内容呢?
- VC 如何定位到文件所在的文件夹并且,文件是被选中的?
- VS2005调试遇到一个MFC类的变量成员不存在的问题!
- ==30分求基本但如用出错的小问题:定义在函数外的参数的作用域是多大?,内详==
- 如何调用打开wrl文件
- ADO紧急求助
- visual studio.net中文正式版的版本号是多少?
- 超级简单问题:给Edit控件加位图背景
- 为什么没有显示窗口?
- 浮雕效果代码功能未实现-->(编译能通过,但运行时直接崩溃了)<--希望哪位大哥能帮帮忙
- 调试时出现这样的警告是什么意思?
- 如何在COM将数据库中的BLOB字段VARIANT类型转为SAFEARRAY(unsigned char)*
test.h:
#ifndef _TEST_
#define _TEST_
extern int sum(int a ,int b);
#endiftest.c:
#include "test.h"
int sum(int a ,int b)
{
return a + b;
}
#include "stdafx.h"
#include "stdafx.h"
2、从工程中的Source Files中选择test.c
3、从C/C++栏的Category选择Precompiled Headers,然后从下面选择Not using Precompiled Headers即可
#include "stdafx.h"
把test.c改为test.cpp(如果纯c语言可以不用改)
应该可以的
c:\documents and settings\administrator\桌面\testvxmap high quality\rotate.c(2) : fatal error C1853: 'Debug/TestVxMap.pch' is not a precompiled header file created with this compiler