首页上一页 1 下一页尾页 3 条记录 1/1页
<>的例子在WinXp下能不能编译?
发表在C语言图书答疑
2009-07-27
是否精华
是
否
版块置顶:
是
否
我在WinXp下编译第9章的例子出现下面的问题:
Deleting intermediate files and output files for project 'Server - Win32 Debug'.
--------------------Configuration: Server - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
ControlList.cpp
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\serverdlg.h(38) : warning C4091: 'typedef ' : ignored on left of 'struct DataPackage' when no variable is declared
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
Server.cpp
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\serverdlg.h(38) : warning C4091: 'typedef ' : ignored on left of 'struct DataPackage' when no variable is declared
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
ServerDlg.cpp
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(40) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\documents and settings\wangky\桌面\server\gdi\\gdiplusinit.h(97) : error C2059: syntax error : ')'
c:\documents and settings\wangky\桌面\server\serverdlg.h(38) : warning C4091: 'typedef ' : ignored on left of 'struct DataPackage' when no variable is declared
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
c:\documents and settings\wangky\桌面\server\serverdlg.h(53) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
C:\Documents and Settings\wangky\桌面\Server\ServerDlg.cpp(128) : error C2065: 'GdiplusStartup' : undeclared identifier
C:\Documents and Settings\wangky\桌面\Server\ServerDlg.cpp(128) : error C2065: 'm_pGdiToken' : undeclared identifier
Generating Code...
执行 cl.exe 时出错.
Server.exe - 1 error(s), 0 warning(s)
请问这是什么原因?