好吧,我現在初出茅廬,一無所有,只有一台win xp。做什么呢?要不要試試Unix命令行編程的感覺,想到就做。Just try!
1.首先安裝cygwin,最好是選擇離線安裝包。
2.默認選擇安裝所有包,當然要保證GNU工具集和Vim編輯器。
3.安裝成功后,向着整個世界說Hello吧!
4.命令行啟動Vim,輸入I進入編輯模式,寫完代碼,ESC+冒號+w helloworld.c保存文件。
1 #include <stdio.h> 2 int main() 3 { 4 printf("Hello World C! "); 5 return 0; 6 }
5.編譯代碼: gcc -o helloworld.o helloworld.c
6.運行:helloworld.o
Now, it is over today!