扩展DLL无法编译通过,高手快来帮忙。

zxfvc 2004-01-12 11:12:14
我用向导生成一个扩展DLL的工程,再添加一个my.h文件:
#include "stdafx.h"

class CClass
{
CString name;
public:
CClass(CString str);
CString Getname();
};

在my.cpp文件里:
#include "my.h"

CClass::CClass(CString str)
{
name=str;
}

CString CClass::Getname()
{
return name;
}

编译怎么老是提示“fatal error C1010: unexpected end of file while looking for precompiled header directive”,是不是在什么地方还应添加些什么?请各位知道的朋友解决一下,在线急等,解决立即结帖。

...全文
47 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
VCSQLVB 2004-01-14
  • 打赏
  • 举报
回复
#include "stdafx.h"应在.cpp里,去掉.h中的#include "stdafx.h",我帮你调试过了,可以通过。
freeshoot 2004-01-12
  • 打赏
  • 举报
回复
然后,最好Rebuild All.
freeshoot 2004-01-12
  • 打赏
  • 举报
回复
去掉my.h里面的#include "stdafx.h";
在my.cpp里面加入#include "stdafx.h""
DotLSong 2004-01-12
  • 打赏
  • 举报
回复
啊哦,主要是 stdafx.h 的问题

15,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧