glibc怎麼開始使用? - Linux

Table of Contents


我只裝過一次Linux, 是Ubuntu,
完全不會Linux,
但是因為作業指定必須使用glibc來寫, 所以我有以下問題:

1. 我在windows底下必須安裝譬如visual c之類的
compiler/IDE才能compile寫出來的c code,
那請問所謂的glibc compiler是在我Linux裝完之後就已經內建在系統裡了嗎?

2. 如上題為否, 請問我要怎麼安裝glibc呢? (有文件可以看嗎)
如上題為是, 那是指我進入console模式,
隨便在一個資料夾下面寫c code都可以compile嗎?

3. 我不太清楚要怎麼compile, 或者是說我不太清楚gcc跟glibc的差別,
不過就以流程上, 我就include glibc的function到我的c code,
然後在console模式下用gcc進行compile, 是這樣嗎?

謝謝回答.

--

All Comments

Mary avatarMary2010-03-08
能開完一般的distro 就肯定有 glibc,你缺的是 devel
Sarah avatarSarah2010-03-10
glibc就是一個library gcc是conpiler(在devel中)
Kama avatarKama2010-03-11
請問"一般的distro"是指Linux如Ubuntu/Mandrake/Redhat嗎?
"devel"是指develop tool?
Hedda avatarHedda2010-03-13
抱歉我換個問法, 我不怕寫C, 但是對Linux完全不懂, 請問我要
怎麼樣弄出一個環境讓我寫C且可以compile呢?
Tom avatarTom2010-03-15
ubuntu 裝完, command line 打 gcc 就可以 compile 了
Cara avatarCara2010-03-15
ubuntu預設沒gcc吧?
Michael avatarMichael2010-03-20
那請問ubuntu要怎麼開始撰寫c並且compile呢?
Bennie avatarBennie2010-03-23
vi a.c. Type this:
#include<stdio.h>
int main(){
printf("hello world");return 0;
}
then, gcc a.c
Ina avatarIna2010-03-24
然後會跑出執行檔"a.out",再下./a.out去跑就ok了
Hedda avatarHedda2010-03-27
ubuntu 9.04 有啊, 我光碟放進去,一切自動,裝完就有gcc啊
Brianna avatarBrianna2010-03-30
原PO是不是只會用VC那種UI介面,要用mouse點一下某按鈕才能動
Delia avatarDelia2010-04-03
的? 那在Linux裏可能要裝一些別的..<-請google Linux IDE之類
Lauren avatarLauren2010-04-06
原PO應該是需要類似netbeans或eclipse這種IDE~