分页: 1 / 1

[问题]如何在8.04中调出g++用来编译C程序?

发表于 : 2008-05-04 11:16
ufo-cn
装好ubuntu8.04后自带g++,但是我不知道如何打开哦,郁闷的很.....
我是不是相当菜?呵呵! :oops:

发表于 : 2008-05-04 11:18
yaoms

发表于 : 2008-05-04 11:21
ufo-cn
晕,就是看过帖子后仍然一头雾水...

发表于 : 2008-05-04 11:23
yaoms
我给你的那个是最简单的入门了,如果还看不懂,那我也没办法阿

发表于 : 2008-05-04 11:26
jeffwei
As a specific example, on
the UNIX operating system you must create the program in a file whose name ends in ``.c'',
such as hello.c, then compile it with the command
cc hello.c
If you haven't botched anything, such as omitting a character or misspelling something, the
compilation will proceed silently, and make an executable file called a.out. If you run a.out
by typing the command
a.out
it will print
hello, world

发表于 : 2008-05-04 21:53
gmagogsfm
yaoms 写了:我给你的那个是最简单的入门了,如果还看不懂,那我也没办法阿
直接 g++ filename.c
就可以生成a.out
然后./a.out就可以执行了

发表于 : 2008-05-05 22:22
ufo-cn
呵呵,已经在试着编写hello.c了,谢谢支持