找不到 cc gcc 还有 makefile ,请帮忙....

软件和网站开发以及相关技术探讨
Enchanter
帖子: 6
注册时间: 2005-07-25 17:01
联系:

找不到 cc gcc 还有 makefile ,请帮忙....

#1

帖子 Enchanter » 2005-07-26 21:17

输入 cc 提示:

bash: cc: command not found

$ gcc

bash: cc: command not found

安装了gvim 可以执行,但执行Make 之后,提示:

make:*** 没有指明目标并且找不到 makefile。 停止。

请高人指点...谢谢
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#2

帖子 gnix_oag » 2005-07-26 21:27

哪就安装啊
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市

#3

帖子 yonsan » 2005-07-26 21:27

装gcc:
$ sudo aptitude install gcc

装新版本的automake (有时有些软件需要1.5以上的automake工具)
$ sudo aptitude remove automake1.4
$ sudo aptitude install automake1.9

查看一下是否装好了:
$ gcc --version
$ automake --version

打完字了,收工!!
I will be back!
Enchanter
帖子: 6
注册时间: 2005-07-25 17:01
联系:

#4

帖子 Enchanter » 2005-07-26 21:46

这么快!佩服,谢谢yonsan兄!
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市

#5

帖子 yonsan » 2005-07-26 21:48

呵呵,你也用gvim吗?
viewtopic.php?t=1345
交流交流!!
I will be back!
Enchanter
帖子: 6
注册时间: 2005-07-25 17:01
联系:

#6

帖子 Enchanter » 2005-07-27 6:39

读了你的帖子才装的gvim^_^,从前用的是dos-~win2k3...05年7月26日是我第一次正式用Unix(linux)系统,因为从来没接触到,所以...[/list]
头像
lyreopera
帖子: 771
注册时间: 2005-05-23 13:38
来自: gdsz

#7

帖子 lyreopera » 2005-07-27 11:18

告诉我哪里有gvim下载~~~~~

我怎么都找不到……
……
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市

#8

帖子 yonsan » 2005-07-27 11:24

安装gvim:
$ sudo aptitude install vim-gnome

新建gvim链接图标
$ sudo echo '[Desktop Entry]' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Name=Gvim' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Comment[zh_CN]=Gvim编辑器' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Exec=gvim' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Icon=/usr/share/pixmaps/gnome-word.png' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Terminal=false' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'X-MultipleArgs=false' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Type=Application' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Categories=Application;Development;' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'Encoding=UTF-8' >> /usr/share/applications/Gvim.desktop
$ sudo echo 'StartupNotify=true' >> /usr/share/applications/Gvim.desktop

具体参见:
viewtopic.php?t=1551
上次由 yonsan 在 2005-07-27 14:58,总共编辑 2 次。
I will be back!
头像
lyreopera
帖子: 771
注册时间: 2005-05-23 13:38
来自: gdsz

#9

帖子 lyreopera » 2005-07-27 11:29

原来gvim就是vim-gnome,

难怪我怎么搜gvim都找不到……
……
rApJtR
帖子: 221
注册时间: 2005-08-01 20:35
来自: Hong Kong

#10

帖子 rApJtR » 2005-08-04 12:50

我也有搂住那个毛病……

可是 gcc automake 都装了呀
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市

#11

帖子 yonsan » 2005-08-04 12:54

rApJtR 写了:我也有搂住那个毛病……

可是 gcc automake 都装了呀
能说具体点吗?
你确认在你打开的当前文件目录下已经有makefile或Makefile了吗?
I will be back!
rApJtR
帖子: 221
注册时间: 2005-08-01 20:35
来自: Hong Kong

#12

帖子 rApJtR » 2005-08-04 13:04

谢谢…… 解决了
刚才没有 makefile
不过
我用 c++ 做得 好像不能编译……
c++的编译器叫什么?怎么用的?

还有 那个 makefile 是不是 编一个程序就要做一个? 能不能通用?
头像
yonsan
帖子: 887
注册时间: 2005-07-01 18:56
来自: 广州市

#13

帖子 yonsan » 2005-08-04 13:10

编译C++程序建议你用g++替代gcc命令!!
makefile其实就是管理你的程序代码的!
你可以学习autoconf automake等自动生成makefile工具!
自已写个当然可以啦!
I will be back!
fancing
帖子: 32
注册时间: 2005-09-27 9:28
来自: 惠州

#14

帖子 fancing » 2005-09-27 9:40

yonsan 写了:编译C++程序建议你用g++替代gcc命令!!
makefile其实就是管理你的程序代码的!
你可以学习autoconf automake等自动生成makefile工具!
自已写个当然可以啦!
那么,就是说装了gcc就有g++了??不是应该装了g++会有gcc吗?反了?
请教,如何获取g++,告诉源地址,谢谢!

搞了好久都没搞定的!
只爱百合花@_@
------------------------------
Ubuntu答疑-惠州学院计算机系ZSN老师
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#15

帖子 leal » 2005-09-27 9:58

gcc 现在主要就是编译c代码,g++编译C++,装了gcc不等于装了g++
你用synaptic搜索一下,只要源设置对了,根本没问题。
用心×恒 | 豆瓣 | 门户 | Blog
回复