请问下面这段程序怎么编译?
这是FENG YUAN 的Windows Graphics Programming Win32 GDI and DirectDraw书上第一章的一个例子
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <assert.h>
void CenterText(HDC hdc, int x,int y, LPCTSTR szFace,
LPCTSTR szMessage,int point)
{
HFONT hFont = CreateFont(
-point * GetDeviceCaps(hdc,LOGPIXELSX) / 72,
0,0,0,FW_BOLD,TRUE,FALSE,FALSE,
ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS,
PROOF_QUALITY,VARIABLE_PITCH,szFace);
assert(hFont);
HGDIOBJ hOld = SelectObject(hdc,hFont);
SetTextAlign(hdc,TA_CENTER | TA_BASELINE);
SetBkMode(hdc,TRANSPARENT);
SetTextColor(hdc,RGB(0,0,0xFF));
TextOut(hdc,x,y,szMessage,_tcslen(szMessage));
SelectObject(hdc,hOld);
DeleteObject(hFont);
}
const TCHAR szMessage[] = _T("hello,world");
const TCHAR szFace[] = _T("Times New Roman");
#pragma comment(linker,"-merge:.rdata=.text")
#pragma comment(linker,"-align:512");
extern "C" void WinMainCRTStartup()
{
HDC hDC = GetDC(NULL);
assert(hDC);
CenterText(hDC,GetSystemMetrics(SM_CXSCREEN)/2,
GetSystemMetrics(SM_CYSCREEN)/2,
szFace,szMessage,72);
ReleaseDC(NULL,hDC);
ExitProcess(0);
}
编译的时候说unresolved external symbol _main referenced in function _mainCRTStartup
请问应该在Project settings里面做什么样的设置才能编译通过?