首页上一页 1 下一页尾页 1 条记录 1/1页
<>使用GDI+显示GIF图像的实例运行出错
发表在C语言图书答疑
2011-11-07
是否精华
是
否
版块置顶:
是
否
你好!
P336页例12.17实例运行报错(实例位置:光盘\TM\sl\12\17),报错信息如下:
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
ShowGIFView.cpp
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(71) : error C2065: 'GdiplusStartup' : undeclared identifier
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(71) : error C2065: 'm_pGdiToken' : undeclared identifier
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(163) : warning C4018: '==' : signed/unsigned mismatch
Generating Code...
Error executing cl.exe.
Creating browse info file...
ShowGIF.exe - 32 error(s), 3 warning(s)
能否告知原因及解决办法?
谢谢!
P336页例12.17实例运行报错(实例位置:光盘\TM\sl\12\17),报错信息如下:
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
ShowGIFView.cpp
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'ULONG_PTR' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2065: 'token' : undeclared identifier
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(39) : error C2071: 'NotificationHookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2165: 'left-side modifier' : cannot modify pointers to data
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2071: 'NotificationUnhookProc' : illegal storage class
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(40) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(91) : error C2059: syntax error : 'const'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2146: syntax error : missing ')' before identifier 'token'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : warning C4229: anachronism used : modifiers on data are ignored
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\gdiplus\\gdiplusinit.h(97) : error C2059: syntax error : ')'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2146: syntax error : missing ';' before identifier 'm_pGdiToken'
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
f:\visual c++从入门到精通 光盘\tm\sl\12\17\showgif\showgifview.h(22) : error C2501: 'm_pGdiToken' : missing storage-class or type specifiers
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(71) : error C2065: 'GdiplusStartup' : undeclared identifier
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(71) : error C2065: 'm_pGdiToken' : undeclared identifier
F:\visual C++从入门到精通 光盘\TM\sl\12\17\ShowGIF\ShowGIFView.cpp(163) : warning C4018: '==' : signed/unsigned mismatch
Generating Code...
Error executing cl.exe.
Creating browse info file...
ShowGIF.exe - 32 error(s), 3 warning(s)
能否告知原因及解决办法?
谢谢!