windows核心编程第五版原代码编译错误,总是有102个错误

zhaoshan313 2009-07-18 07:03:39
无论我编译原代码中的哪一个都是出现这样的错误。我在http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
下载了最新的SDK安装好,并在我的VC++ 6.0的 Tools -> Options -> Directories的Executable files下添加
D:\Program Files\Microsoft SDK\Bin和
D:\Program Files\Microsoft SDK\Bin\winnt
在Include files下添加了
D:\Program Files\Microsoft SDK\include
Library files下添加
D:\Program Files\Microsoft SDK\Lib
现在的MSDN能识别 NMHDR 编辑插件也能认识 NMHDR,但每个程序都出现了102个错误,如下:



--------------------Configuration: ErrorShow - Win32 Debug--------------------
Compiling...
ErrorShow.cpp
d:\program files\microsoft sdk\include\prsht.h(531) : error C2146: syntax error : missing ';' before identifier 'hdr'
d:\program files\microsoft sdk\include\prsht.h(531) : error C2501: 'NMHDR' : missing storage-class or type specifiers
d:\program files\microsoft sdk\include\prsht.h(531) : error C2501: 'hdr' : missing storage-class or type specifiers
d:\program files\microsoft sdk\include\commctrl.h(276) : error C2146: syntax error : missing ';' before identifier 'hdr'
d:\program files\microsoft sdk\include\commctrl.h(276) : error C2501: 'NMHDR' : missing storage-class or type specifiers
.
.
.
d:\program files\microsoft sdk\include\commctrl.h(4358) : error C2501: 'NMHDR' : missing storage-class or type specifiers
d:\program files\microsoft sdk\include\commctrl.h(4358) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.

哪位大虾能help me
...全文
167 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
honker110 2011-08-12
  • 打赏
  • 举报
回复

#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define _WIN32_IE 0x0501
sleepynow 2010-03-17
  • 打赏
  • 举报
回复
Code Samples and System Requirements
The sample applications presented throughout this book can be downloaded from the book's companion content Web page at

http://www.Wintellect.com/Books.aspx

To build the applications, you'll need Visual Studio 2005 (or later), the Microsoft Platform SDK for Windows Vista and Windows Server 2008 (which comes with some versions of Visual Studio). In addition, to run the applications, you'll need a computer (or virtual machine) with Windows Vista (or later) installed.

xjq2003 2010-03-17
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 yykkdd2002 的回复:]
你加个#include<windows.h>试试,我原来也是这样,后来试试把windows.h引入竟然错误没了
[/Quote]可以试一试
yykkdd2002 2010-03-10
  • 打赏
  • 举报
回复
你加个#include<windows.h>试试,我原来也是这样,后来试试把windows.h引入竟然错误没了

1,221

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧