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