D
d村长
Unregistered / Unconfirmed
GUEST, unregistred user!
请教懂VC的各位高手,我错在什么地方??
我用如下方法建立了一个VC++程序:
运行VC—>新建工作(WIN32 Application) —>AN empty project -->插入一个c++ source file-->加入如下代码,然后进行编译
//------------------------------------
#include <afxwin.h>
class CHelloFrame : public CFrameWnd
{
public:
CHelloFrame()
{
Create(NULL,"hello wold!",
WS_OVERLAPPEDWINDOW,rectDefault);
}
};
class CHelloApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
BOOL CHelloApp::InitInstance()
{
m_pMainWnd = new CHelloFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
CHelloApp HelloApp;
//-------------
运行时显示如下:
Compiling...
gf.cpp
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __begin
threadex
Debug/fs.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
fs.exe - 3 error(s), 0 warning(s)
我错在什么地方,这个程序我怎么才能正确运 行啊~???
我用如下方法建立了一个VC++程序:
运行VC—>新建工作(WIN32 Application) —>AN empty project -->插入一个c++ source file-->加入如下代码,然后进行编译
//------------------------------------
#include <afxwin.h>
class CHelloFrame : public CFrameWnd
{
public:
CHelloFrame()
{
Create(NULL,"hello wold!",
WS_OVERLAPPEDWINDOW,rectDefault);
}
};
class CHelloApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
BOOL CHelloApp::InitInstance()
{
m_pMainWnd = new CHelloFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
CHelloApp HelloApp;
//-------------
运行时显示如下:
Compiling...
gf.cpp
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __begin
threadex
Debug/fs.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
fs.exe - 3 error(s), 0 warning(s)
我错在什么地方,这个程序我怎么才能正确运 行啊~???