error LNK2001: 无法解析的外部符号 "public:求教

MayBeTomWay 2011-04-27 11:42:17
1> main.cpp
1> _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>main.obj : error LNK2001: 无法解析的外部符号 "public: __thiscall workman::workman(void)" (??0workman@@QAE@XZ)
1>D:\graduation project\ChineseShow\Release\ChineseShow.exe : fatal error LNK1120: 1 个无法解析的外部命令

原来没错,但是在main.cpp中加了
 
pDC=new CDC();
w1=new workman();
w1->display(pDC);

之后便出现了上述错误。workman 定义如下

class workman : public RectF

{
public:
workman(void);
~workman(void);
void display(CDC*);
};

头文件如下

#include "stdafx.h"
#include <string>
#include <windows.h>
#include <objidl.h>
#include <gdiplus.h>
#include<afxwin.h>
#include <WinSDKVer.h>
using namespace Gdiplus;
using namespace std;
#pragma comment (lib,"Gdiplus.lib")


这是一个很大的问题…………求指教^^
...全文
252 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
MayBeTomWay 2011-04-30
  • 打赏
  • 举报
回复
谢谢楼上各位啊
ouyh12345 2011-04-27
  • 打赏
  • 举报
回复
函数没有实现
zyrr159487 2011-04-27
  • 打赏
  • 举报
回复
清理下, 重新生成工程试试
Eleven 2011-04-27
  • 打赏
  • 举报
回复
你的构造函数没有实现?
HowToP2p 2011-04-27
  • 打赏
  • 举报
回复
workman构造函数析构函数的定义在哪?

19,469

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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