Dev.C++ 下如何图形化编程?

tiwafic 2008-03-21 11:17:55
各位大家好!
我开始用Graphics.h函数库编程,可是在Dev C++下不能编译通过,提示说找不到Graphics.h函数库,但是后来我复制一个到include里面,编译又提示错误:
D:/Program Files/DEV-CPP/include/graphics.h:248: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:249: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:250: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:250: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:251: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:252: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:253: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:253: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:254: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:254: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:255: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:255: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:256: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:256: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:257: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:257: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:257: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:258: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:258: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:258: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:259: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:260: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:261: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:261: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:262: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:262: error: syntax error before '*' token

...全文
1248 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
guosirI 2010-07-25
  • 打赏
  • 举报
回复
到dev c++的官网去下个插件模板,那里头就有图形包
qmm161 2008-03-21
  • 打赏
  • 举报
回复
你光复制一个头文件有什么用?又没有lib库实现!
tiwafic 2008-03-21
  • 打赏
  • 举报
回复
请问楼上的指哪些?
那么Windos下又如何图形化编程呢?
tiwafic 2008-03-21
  • 打赏
  • 举报
回复
等等......
D:/Program Files/DEV-CPP/include/graphics.h:381: warning: array 'sansserif_font_far' assumed to have one element
D:/Program Files/DEV-CPP/include/graphics.h:382: warning: array 'gothic_font_far' assumed to have one element

执行结束


我就写了如下代码:
#include<graphics.h>
void main()
{
int graphdriver=DETECT;
int graphmode;
initgraph(&graphdriver,&graphmode,"");
closegraph();
}

那么在Dev.C++下如何编程图形化呢?

我在include里面发现direct.h和dxerr9.h库函数,请问这是不是Direct程序设计所要的呢?
还有GL文件夹里面有gl.h等等,请问如何使用呢?
tiwafic 2008-03-21
  • 打赏
  • 举报
回复
D:/Program Files/DEV-CPP/include/graphics.h:262: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:263: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:263: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:264: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:264: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:264: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:265: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:265: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:265: warning: data definition has no type or storage class

D:/Program Files/DEV-CPP/include/graphics.h:266: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:266: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:267: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:267: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:268: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:268: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:269: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:269: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:270: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:270: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:270: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:271: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:271: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:271: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:272: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:272: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:273: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:274: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:274: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:275: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:275: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:275: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:276: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:276: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:277: error: syntax error before "_Cdecl"
tiwafic 2008-03-21
  • 打赏
  • 举报
回复
D:/Program Files/DEV-CPP/include/graphics.h:262: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:263: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:263: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:264: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:264: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:264: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:265: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:265: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:265: warning: data definition has no type or storage class

D:/Program Files/DEV-CPP/include/graphics.h:266: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:266: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:267: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:267: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:268: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:268: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:269: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:269: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:270: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:270: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:270: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:271: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:271: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:271: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:272: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:272: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:273: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:274: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:274: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:275: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:275: error: syntax error before '*' token
D:/Program Files/DEV-CPP/include/graphics.h:275: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:276: error: syntax error before "_Cdecl"
D:/Program Files/DEV-CPP/include/graphics.h:276: warning: data definition has no type or storage class
D:/Program Files/DEV-CPP/include/graphics.h:277: error: syntax error before "_Cdecl"
xiaooqiang 2008-03-21
  • 打赏
  • 举报
回复
windows编程,WINAPI
tiwafic 2008-03-21
  • 打赏
  • 举报
回复
在网上看到说graphics.h只能用在TC2.0环境下,那么其他环境可以用吗?
比如:Dev C++?

70,017

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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