| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 6095 人关注过本帖
标题:关于easyx在code::Blocks的问题
只看楼主 加入收藏
thlgood
Rank: 5Rank: 5
等 级:职业侠客
帖 子:281
专家分:381
注 册:2010-9-24
结帖率:91.43%
收藏
已结贴  问题点数:20 回复次数:10 
关于easyx在code::Blocks的问题
codeblocks版本:10.05
MinGW,不解释
编译器选GCC
easyx选最新版……EasyX 2011惊蛰版
我把lib和include里面的文件已经添加到MinGW对应的文件夹了
然后新建工程,写入如下代码:
程序代码:
#include <graphics.h>
#include <conio.h>
void main()
{
    initgraph(640, 480);
  circle(200, 200, 100);
  getch();
  closegraph();
}

编译的时候报错,错误来自graphics.h
搜索更多相关主题的帖子: 新建 文件夹 编译器 
2011-04-11 21:16
thlgood
Rank: 5Rank: 5
等 级:职业侠客
帖 子:281
专家分:381
注 册:2010-9-24
收藏
得分:0 
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|97|error: expected ';', ',' or ')' before '=' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|109|error: expected ';', ',' or ')' before '=' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|110|error: expected ';', ',' or ')' before '=' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|111|error: expected ';', ',' or ')' before '=' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|112|error: expected ';', ',' or ')' before '=' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|158|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|169|error: conflicting types for 'outtext'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|168|note: previous declaration of 'outtext' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|171|error: conflicting types for 'outtextxy'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|170|note: previous declaration of 'outtextxy' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|173|error: conflicting types for 'textwidth'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|172|note: previous declaration of 'textwidth' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|175|error: conflicting types for 'textheight'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|174|note: previous declaration of 'textheight' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|177|error: conflicting types for 'drawtext'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|176|note: previous declaration of 'drawtext' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|195|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|195|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|195|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|195|error: conflicting types for 'setfont'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|194|note: previous declaration of 'setfont' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|196|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|196|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|196|error: expected declaration specifiers or '...' before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|196|error: conflicting types for 'setfont'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|194|note: previous declaration of 'setfont' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|197|error: conflicting types for 'setfont'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|194|note: previous declaration of 'setfont' was here|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|205|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMAGE'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|239|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|240|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|241|error: expected declaration specifiers or '...' before 'IMAGE'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|242|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|243|error: expected ';', ',' or ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|244|error: expected ';', ',' or ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|245|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|246|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|247|error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|248|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|249|error: expected ')' before '*' token|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|269|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'InputBox'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|289|error: expected specifier-qualifier-list before 'bool'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|299|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MouseHit'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|300|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetMouseMsg'|
F:\easyx_test\main.c|4|warning: return type of 'main' is not 'int'|
F:\easyx_test\main.c||In function 'main':|
F:\easyx_test\main.c|6|warning: passing argument 1 of 'initgraph' makes pointer from integer without a cast|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|98|note: expected 'int *' but argument is of type 'int'|
F:\easyx_test\main.c|6|warning: passing argument 2 of 'initgraph' makes pointer from integer without a cast|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\graphics.h|98|note: expected 'int *' but argument is of type 'int'|
F:\easyx_test\main.c|6|error: too few arguments to function 'initgraph'|
F:\easyx_test\main.c|7|error: stray '\241' in program|
F:\easyx_test\main.c|7|error: stray '\241' in program|
F:\easyx_test\main.c|7|error: stray '\241' in program|
F:\easyx_test\main.c|7|error: stray '\241' in program|
F:\easyx_test\main.c|8|error: stray '\241' in program|
F:\easyx_test\main.c|8|error: stray '\241' in program|
F:\easyx_test\main.c|8|error: stray '\241' in program|
F:\easyx_test\main.c|8|error: stray '\241' in program|
F:\easyx_test\main.c|9|error: stray '\241' in program|
F:\easyx_test\main.c|9|error: stray '\241' in program|
F:\easyx_test\main.c|9|error: stray '\241' in program|
F:\easyx_test\main.c|9|error: stray '\241' in program|
||=== Build finished: 49 errors, 3 warnings ===|

o(∩∩)Linux & Python 群:187367181
2011-04-11 21:17
thlgood
Rank: 5Rank: 5
等 级:职业侠客
帖 子:281
专家分:381
注 册:2010-9-24
收藏
得分:0 
不见大大发言……自己顶一个

o(∩∩)Linux & Python 群:187367181
2011-04-11 22:26
lucky563591
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:小飞侠
威 望:4
帖 子:765
专家分:2103
注 册:2009-11-18
收藏
得分:4 
应该是编码方式出问题了。
2011-04-12 08:03
laoyang103
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:内蒙古包头
等 级:贵宾
威 望:19
帖 子:3082
专家分:11056
注 册:2010-5-22
收藏
得分:4 
编译器他不认识你的代码  

是不是你是输入法不对

                                         
===========深入<----------------->浅出============
2011-04-12 08:40
御坂美琴
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:魔術の禁書目錄
等 级:小飞侠
威 望:9
帖 子:952
专家分:2929
注 册:2010-8-18
收藏
得分:4 
不支持那就不要用它,用能支持的

永远为正义而奋斗,锄强扶弱的Level 5 超能力者
とある魔術の禁書目錄インデックス__御み坂さか美み琴こと
http://bbs.bccn.net/space.php?action=threads&uid=483997
2011-04-12 09:34
BlueGuy
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:29
帖 子:4476
专家分:4055
注 册:2009-4-18
收藏
得分:4 
竟然还有人 误导他人不要用标准的编译器, 真是罪过...
没办法,谁让别人是"权威", 是"砖家"呢!

[ 本帖最后由 BlueGuy 于 2011-4-12 11:01 编辑 ]

我就是真命天子,顺我者生,逆我者死!
2011-04-12 10:45
御坂美琴
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:魔術の禁書目錄
等 级:小飞侠
威 望:9
帖 子:952
专家分:2929
注 册:2010-8-18
收藏
得分:0 
我那句话有这么大的歧义吗?
那我补充吧,请楼主不要使用easyx,使用支持mingw的库

想借机人身攻击者自重

永远为正义而奋斗,锄强扶弱的Level 5 超能力者
とある魔術の禁書目錄インデックス__御み坂さか美み琴こと
http://bbs.bccn.net/space.php?action=threads&uid=483997
2011-04-12 14:41
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:4 
叫兽辛苦了

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-12 16:26
BlueGuy
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:29
帖 子:4476
专家分:4055
注 册:2009-4-18
收藏
得分:0 
再怎么新, 也是20年前的技术...
只有20年前的智慧,才能习惯20年前的技术。

[ 本帖最后由 BlueGuy 于 2011-4-12 23:21 编辑 ]

我就是真命天子,顺我者生,逆我者死!
2011-04-12 23:14
快速回复:关于easyx在code::Blocks的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027155 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved