免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5284 | 回复: 5
打印 上一主题 下一主题

codeblocks for windows中有没有类似Turbo C的graphics.h/graphics.lib [复制链接]

论坛徽章:
6
季节之章:冬
日期:2015-01-20 17:18:002015年辞旧岁徽章
日期:2015-03-03 16:54:15数据库技术版块每日发帖之星
日期:2015-12-20 06:20:00程序设计版块每日发帖之星
日期:2016-06-09 06:20:00每日论坛发贴之星
日期:2016-06-09 06:20:002016科比退役纪念章
日期:2017-01-12 14:08:57
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-08-12 11:06 |只看该作者 |倒序浏览
本帖最后由 liklstar 于 2010-08-12 11:58 编辑

codeblocks for windows + GCC 中有没有类似Turbo C的graphics.h/graphics.lib?

在codeblocks for windows中编写图形程序,需要哪些图形库和头文件啊?都叫什么名字啊?
也是像:
    #include <graphics.h>
这样用吗?

论坛徽章:
6
季节之章:冬
日期:2015-01-20 17:18:002015年辞旧岁徽章
日期:2015-03-03 16:54:15数据库技术版块每日发帖之星
日期:2015-12-20 06:20:00程序设计版块每日发帖之星
日期:2016-06-09 06:20:00每日论坛发贴之星
日期:2016-06-09 06:20:002016科比退役纪念章
日期:2017-01-12 14:08:57
2 [报告]
发表于 2010-08-12 16:13 |只看该作者
如何将Turbo C的Graphics.lib连接进code::blocks?
code::blocks的人说可以。

论坛徽章:
14
巨蟹座
日期:2013-11-19 14:09:4615-16赛季CBA联赛之青岛
日期:2016-07-05 12:36:0515-16赛季CBA联赛之广东
日期:2016-06-29 11:45:542015亚冠之全北现代
日期:2015-07-22 08:09:472015年辞旧岁徽章
日期:2015-03-03 16:54:15巨蟹座
日期:2014-12-29 08:22:29射手座
日期:2014-12-05 08:20:39狮子座
日期:2014-11-05 12:33:52寅虎
日期:2014-08-13 09:01:31巳蛇
日期:2014-06-16 16:29:52技术图书徽章
日期:2014-04-15 08:44:01天蝎座
日期:2014-03-11 13:06:45
3 [报告]
发表于 2010-08-12 19:29 |只看该作者
codeblocks for windows + GCC 中有没有类似Turbo C的graphics.h/graphics.lib?
------ 如果windows操作系统有dos的图形库,那么你的问题的答案就是“有”。但windows操作系统有dos的图形库吗?

在codeblocks for windows中编写图形程序,需要哪些图形库和头文件啊?
------ 图形APIs基本上都在windows.h中,比如MoveTo,LineTo等等
你也可以用wxWidgets,qt等跨平台的图形库(但绝对跨不到DOS上去)。

论坛徽章:
6
季节之章:冬
日期:2015-01-20 17:18:002015年辞旧岁徽章
日期:2015-03-03 16:54:15数据库技术版块每日发帖之星
日期:2015-12-20 06:20:00程序设计版块每日发帖之星
日期:2016-06-09 06:20:00每日论坛发贴之星
日期:2016-06-09 06:20:002016科比退役纪念章
日期:2017-01-12 14:08:57
4 [报告]
发表于 2010-08-13 12:13 |只看该作者
本帖最后由 liklstar 于 2010-08-13 12:15 编辑

回复 3# bruceteen

在code::blocks中,我想用mingw32-gcc连接Turbo C的non-standard图形库Graphics.lib/Graphics.h,可以吗?

-------------- Build: Debug in z-buffer ---------------

mingw32-gcc.exe -Wall -std=c99  -g -std=c99  compiler logging="full command line"   -IC:\MinGW\bin -IC:\MinGW\bin  -c D:\WorkingArea\Graphic\z-buffer\main.c -o obj\Debug\main.o
D:\WorkingArea\Graphic\z-buffer\main.c:3:22: graphics.h: No such file or directory
D:\WorkingArea\Graphic\z-buffer\main.c:61: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `calcabcd':
D:\WorkingArea\Graphic\z-buffer\main.c:77: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:132: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `buildPT':
D:\WorkingArea\Graphic\z-buffer\main.c:150: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:153: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c:162: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `buildET':
D:\WorkingArea\Graphic\z-buffer\main.c:194: warning: implicit declaration of function `getch'
D:\WorkingArea\Graphic\z-buffer\main.c:202: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:249: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `insertedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:273: warning: suggest parentheses around assignment used as truth value
D:\WorkingArea\Graphic\z-buffer\main.c:282: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: In function `findcolor':
D:\WorkingArea\Graphic\z-buffer\main.c:294: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:298: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `deleteedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:321: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:343: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `pairleftedge':
D:\WorkingArea\Graphic\z-buffer\main.c:359: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:362: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `pairrightedge':
D:\WorkingArea\Graphic\z-buffer\main.c:377: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:380: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `deletecurrentedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:387: warning: `return' with no value, in function returning non-void
D:\WorkingArea\Graphic\z-buffer\main.c:395: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:398: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `setva':
D:\WorkingArea\Graphic\z-buffer\main.c:426: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:430: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `main':
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: `VGA' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: (Each undeclared identifier is reported only once
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: for each function it appears in.)
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: `VGAHI' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:456:2: warning: "/*" within comment
D:\WorkingArea\Graphic\z-buffer\main.c:463: warning: suggest explicit braces to avoid ambiguous `else'
D:\WorkingArea\Graphic\z-buffer\main.c:483:2: warning: "/*" within comment
D:\WorkingArea\Graphic\z-buffer\main.c:485: warning: implicit declaration of function `registerbgidriver'
D:\WorkingArea\Graphic\z-buffer\main.c:485: error: `EGAVGA_driver' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:486: warning: implicit declaration of function `initgraph'
D:\WorkingArea\Graphic\z-buffer\main.c:487: warning: implicit declaration of function `setbkcolor'
D:\WorkingArea\Graphic\z-buffer\main.c:487: error: `GREEN' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:488: warning: implicit declaration of function `setcolor'
D:\WorkingArea\Graphic\z-buffer\main.c:488: error: `YELLOW' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:489: warning: implicit declaration of function `clrscr'
D:\WorkingArea\Graphic\z-buffer\main.c:495: warning: implicit declaration of function `putpixel'
D:\WorkingArea\Graphic\z-buffer\main.c:435: warning: unused variable `p'
D:\WorkingArea\Graphic\z-buffer\main.c:436: warning: unused variable `ep'
D:\WorkingArea\Graphic\z-buffer\main.c:538: warning: statement with no effect
mingw32-gcc.exe: compiler: No such file or directory
mingw32-gcc.exe: logging=full command line: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
8 errors, 36 warnings


为什么
D:\WorkingArea\Graphic\z-buffer\main.c:3:22: graphics.h: No such file or directory
总找不到graphics.h呢?我已经把graphics.h和graphics.lib拷贝到linker的搜索目录了?

论坛徽章:
0
5 [报告]
发表于 2010-08-13 14:52 |只看该作者
用qt好了,方便易用

论坛徽章:
0
6 [报告]
发表于 2010-08-13 14:55 |只看该作者
TC的库是16位的。CB的编译器和链接器是32位的,基本上断绝了可以链接的可能。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP