安裝
打開終端輸入:
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
yum -y install wget httpd-tools vim
測試
-
查看gcc版本信息
gcc --version
查看gcc版本信息 -
編寫Helloworld
創(chuàng)建名為ctest.c文件
touch ctest.c
編輯該文件
vim ctest.c
ctest.c
#include <stdio.h>
int main()
{
printf("hello world!\n"); return 0;
}
編譯ctest.c文件
gcc ctest.c
可以看到生成了a.out文件
編譯
執(zhí)行a.out
./a.out
執(zhí)行
2020.10.8