这是有声音的视频,请检查播放器或者声音输出设备。
这次的学习内容: linux_C语言_01 配置学习C语言的环境(Linux)和编写第一个HelloWorld程序
学习c语言后, 对以后学习 C++ , Java , PHP , javascript等等 ,很大帮助。
CentOS,Fedora,RedHat,Ubuntu 等等,安装有gcc编译器都可以方便的在linux下学习c语言。
下面我就以 CentOS5.5为例子,演示一下,
安装的时候大家记得把 Development Tools 开发工具安装好,这样安装好系统就可以使用 gcc了。
这是比较适合新手的,不需要安装好系统,再去安装gcc
centos官方网站 www.centos.org
只安装开发工具,下载 前面 3张 iso 就可以了。
CentOS-5.5-i386-bin-1of7.iso
CentOS-5.5-i386-bin-2of7.iso
CentOS-5.5-i386-bin-3of7.iso
//================================================================
7.1.0 build-261024
新建虚拟机:vmCentOS5.5_C 分配5G的硬盘空间
输入 linux text
开始 字符界面下安装centos5.5
Boot Loader Configration
/dev/sda1 First sector of boot partition
查看gcc版本
[root@localhost ~]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//===================================================
下面编写第一个 HelloWorld程序
[root@localhost ~]# vi HelloWorld.c
#include <stdio.h>
main()
{
printf("HelloWorld!\n");
}
[root@localhost ~]# gcc HelloWorld.c
[root@localhost ~]# ./a.out
关闭系统命令: shutdown -h now
视频就到这里结束了,谢谢观看! 88
10月 12th, 2010 at 19:28:58 #这种安装 方法 会不支持 man 等系统命令
如何解决??
[回复]