| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 6095 人关注过本帖
标题:关于easyx在code::Blocks的问题
取消只看楼主 加入收藏
thlgood
Rank: 5Rank: 5
等 级:职业侠客
帖 子:281
专家分:381
注 册:2010-9-24
结帖率:91.43%
收藏
已结贴  问题点数:20 回复次数:2 
关于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
快速回复:关于easyx在code::Blocks的问题
数据加载中...
 
   



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

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