今天看《windows核心编程 第5版》这本书的第19章:DLL基础 ,看到19.2.2节:构建可执行文件 时,编译里面的代码,发现编译通不过。代码如下:
/***************************************************************************
Module: MyExeFile1.cpp
***************************************************************************/
// Include the standard Windows and C-Runtime header files here.
#include <windows.h>
#include <strsafe.h>
#include <stdlib.h>
// Include the exported data structures, symbols, functions, and variables.
#include "MyLib\MyLib.h"
#pragma comment(lib,"Mydll.lib")
////////////////////////////////////////////////////////////////////////////
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) {
int nLeft = 10, nRight = 25;
TCHAR sz[100];
StringCchPrintf(sz, _countof(sz), TEXT("%d + %d = %d"),
nLeft, nRight, Add(nLeft, nRight));
MessageBox(NULL, s