当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 10 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [问题]gcc编译缺少头文件
帖子发表于 : 2008-03-08 18:49 
头像

注册: 2007-12-21 11:28
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
在网上下了一些高手编的c语言程序,用GCC编译时提示缺少头文件graphics.h
然后到tc下cp了一个过来还是用不了,怎么办阿???


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-03-08 19:06 
头像

注册: 2007-01-15 17:15
帖子: 3766
送出感谢: 0 次
接收感谢: 0 次
你就直接贴编译器的输出,别演译了


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2008-03-08 19:17 
头像

注册: 2007-12-21 11:28
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
从tc里copy graphics.h过来后
出错信息:
代码:
liao@liao-desktop:~/c$ gcc snake.c -o snake
In file included from snake.c:1:
graphics.h:241: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘arc’
graphics.h:243: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bar’
graphics.h:244: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bar3d’
graphics.h:246: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘circle’
graphics.h:247: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cleardevice’
graphics.h:248: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘clearviewport’
graphics.h:249: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘closegraph’
graphics.h:250: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘detectgraph’
graphics.h:251: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘drawpoly’
graphics.h:252: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ellipse’
graphics.h:254: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fillellipse’
graphics.h:255: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fillpoly’
graphics.h:256: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘floodfill’
graphics.h:257: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getarccoords’
graphics.h:258: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getaspectratio’
graphics.h:259: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getbkcolor’
graphics.h:260: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getcolor’
graphics.h:261: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getdefaultpalette’
graphics.h:262: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getdrivername’
graphics.h:263: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getfillpattern’
graphics.h:264: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getfillsettings’
graphics.h:265: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getgraphmode’
graphics.h:266: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getimage’
graphics.h:268: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getlinesettings’
graphics.h:269: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmaxcolor’
graphics.h:270: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmaxmode’
graphics.h:271: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmaxx’
graphics.h:272: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmaxy’
graphics.h:273: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmodename’
graphics.h:274: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getmoderange’
graphics.h:276: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpixel’
graphics.h:277: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpalette’
graphics.h:278: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpalettesize’
graphics.h:279: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gettextsettings’
graphics.h:280: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getviewsettings’
graphics.h:281: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getx’
graphics.h:282: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gety’
graphics.h:283: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘graphdefaults’
graphics.h:284: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘grapherrormsg’
graphics.h:285: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_graphfreemem’
graphics.h:286: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
graphics.h:287: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘graphresult’
graphics.h:288: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘imagesize’
graphics.h:289: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initgraph’
graphics.h:292: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘installuserdriver’
graphics.h:293: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘installuserfont’
graphics.h:294: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘line’
graphics.h:295: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘linerel’
graphics.h:296: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lineto’
graphics.h:297: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘moverel’
graphics.h:298: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘moveto’
graphics.h:299: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘outtext’
graphics.h:300: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘outtextxy’
graphics.h:301: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pieslice’
graphics.h:303: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putimage’
graphics.h:304: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putpixel’
graphics.h:305: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rectangle’
graphics.h:306: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘restorecrtmode’
graphics.h:307: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sector’
graphics.h:309: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setactivepage’
graphics.h:310: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setallpalette’
graphics.h:311: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setaspectratio’
graphics.h:312: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setbkcolor’
graphics.h:313: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setcolor’
graphics.h:314: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setfillpattern’
graphics.h:315: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setfillstyle’
graphics.h:316: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setgraphbufsize’
graphics.h:317: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setgraphmode’
graphics.h:318: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setlinestyle’
graphics.h:320: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setpalette’
graphics.h:321: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setrgbpalette’
graphics.h:323: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘settextjustify’
graphics.h:324: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘settextstyle’
graphics.h:325: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setusercharsize’
graphics.h:327: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setviewport’
graphics.h:329: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setvisualpage’
graphics.h:330: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setwritemode’
graphics.h:331: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘textheight’
graphics.h:332: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘textwidth’
graphics.h:337: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘registerfarbgidriver’
graphics.h:349: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CGA_driver_far’
graphics.h:350: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘EGAVGA_driver_far’
graphics.h:351: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IBM8514_driver_far’
graphics.h:352: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Herc_driver_far’
graphics.h:353: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATT_driver_far’
graphics.h:354: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PC3270_driver_far’
graphics.h:360: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘registerfarbgifont’
graphics.h:370: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘triplex_font_far’
graphics.h:371: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘small_font_far’
graphics.h:372: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sansserif_font_far’
graphics.h:373: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gothic_font_far’
graphics.h:377: 错误: 程序中有游离的 ‘\32’
在包含自 snake.c:1 的文件中:
graphics.h:377:2: 警告: 文件未以空白行结束


页首
 用户资料  
 
4 楼 
 文章标题 : Re: [问题]gcc编译缺少头文件
帖子发表于 : 2008-03-08 19:27 

注册: 2006-03-10 15:10
帖子: 3182
地址: xi'an China
送出感谢: 0 次
接收感谢: 2
liaojingli 写道:
在网上下了一些高手编的c语言程序,用GCC编译时提示缺少头文件graphics.h
然后到tc下cp了一个过来还是用不了,怎么办阿???


graphics.h是 tc 特有的东西


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2008-03-08 19:29 
头像

注册: 2007-12-21 11:28
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
:em21 晕啊,那如果要编译这个程序怎么办
请高手指点阿,谢谢了 :em06 :em06


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2008-03-08 19:34 
头像

注册: 2005-08-22 14:05
帖子: 1743
地址: 离开北京
送出感谢: 1
接收感谢: 3
graphics.h。。。。。。。。

bland tc的东西

当然都是 dos 和 bios 的功能的封装

graphics.h 本身只是个定义文件 而函数编译在 .lib 静态库里面 这个和gcc不兼容 linux也没提供有此库的下层接口

在linux下没法用


_________________
错过好多好贴,没占到广告位后悔啊


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2008-03-15 1:05 
头像

注册: 2007-02-16 1:23
帖子: 104
送出感谢: 0 次
接收感谢: 0 次
liaojingli 写道:
:em21 晕啊,那如果要编译这个程序怎么办
请高手指点阿,谢谢了 :em06 :em06

改代码


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2008-03-15 11:46 
头像

注册: 2006-07-02 11:16
帖子: 12522
地址: 廣州
送出感谢: 0 次
接收感谢: 8
TC 的东西是DOS下的东西
跟Linux不通用的


_________________
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。


页首
 用户资料  
 
9 楼 
 文章标题 : make menuconfig报错
帖子发表于 : 2010-12-20 21:34 

注册: 2010-12-20 20:54
帖子: 1
送出感谢: 0 次
接收感谢: 0 次
wang@ubuntu:~/桌面/17.kernel/linux-2.6.34$ make menuconfig *** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2


页首
 用户资料  
 
10 楼 
 文章标题 : Re: [问题]gcc编译缺少头文件
帖子发表于 : 2010-12-20 21:35 
头像

注册: 2007-08-05 17:40
帖子: 4968
送出感谢: 0 次
接收感谢: 4
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2

谢谢了,好不容易找到解决方案了。


_________________
free VPN
YouKuDownLoader
代码:
pip3 install ykdl

install YouKuDownLoader, have fun in downloading.
YouKuDownLoader所支持网站列表


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 10 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译