<>使用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)


能否告知原因及解决办法?
谢谢!
分享到:
精彩评论 1
张小飞
学分:0 LV1
TA的每日心情
开心
2021-10-24 18:57:39
2011-11-10
沙发
读者你好!
该问题已回答请查看上次提问回复。
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照