C++学习笔记1

选择控制台,空项目

#include <afxcoll.h>

class CDrawBox:public CObject
{
public:
 void DoDraw(char *string);
} ;

void CDrawBox::DoDraw(char *cValue)
{
 fprintf(stdout,cValue);
}
int main()
{
    CDrawBox oMyDraw;
 fprintf(stdout,"ssdfdfdf");
    oMyDraw.DoDraw("It's a box!");
 return 0;
}

 

编译后出现如下错误:

nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/jnHid.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

解决方法:

工程 ---设置---常规

Microsoft基础类   改为:使用MFC作为共享的DLL

 

posted on 2013-08-05 15:43  松原蔡晓冬  阅读(146)  评论(0编辑  收藏  举报

导航