- 论坛徽章:
- 0
|
一. 安裝基本的編譯環境和一些輔助工具,如文檔等。
sudo apt-get install manpages-dev
安裝C/C++的Man手冊,這樣你就可以隨時的查看一些你不太瞭解的函式的原型,具体參數說明等;還可以查看一些include檔案的具体說明。
sudo apt-get install build-essential
安裝gcc,g++,make等
sudo apt-get install libc6-dev libstdc++6-4.0-dev
安裝include&lib
sudo apt-get install autoconf automake1.9
安裝autoconf automake1.9
sudo apt-get install binutils-doc cpp-doc gcc-4.0-doc gcc-doc glibc-doc libstdc++6-4.0-doc stl-manual cpp-4.0-doc
安裝文檔
二. 构造一個順手的編輯器,我用的是Vi(Emacs太強了,我不敢賣弄),編輯/root/.vimrc (若無此檔案就建立一個),用如下內容替換。
set nocompatible
" 设定文件浏览器目录为当前目录
set bsdir=buffer
"set autochdir
" 设置编码
set enc=utf-8
" 设置文件编码
set fenc=utf-8
" 设置文件编码检测类型及支持格式
set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
" 指定菜单语言
set langmenu=zh_CN.UTF-8
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" 设置语法高亮度
set syn=cpp
"显示行号
set nu!
" 查找结果高亮度显示
set hlsearch
" tab宽度
set tabstop=8
set cindent shiftwidth=8
set autoindent shiftwidth=8
syntax on
" C/C++注释
set comments=://
" 修正自动C式样注释功能
set comments=s1:/*,mb:*,ex0:/
" 增强检索功能
set tags=./tags,./../tags,./**/tags
" 保存文件格式
set fileformats=unix,dos
" 键盘操作
map gk
map gj
" 命令行高度
set cmdheight=1
" 中文帮助
if version > 603
set helplang=cn
endi
三. 构造一個順手的IDE,Anjuta
sudo apt-get install anjuta
sudo apt-get install automake (前面已安裝)
sudo apt-get install autoconf (前面已安裝)
sudo apt-get install autogen
sudo apt-get install indent
sudo apt-get install libtool
這樣的IDE已經比較能滿足日常使用了,其實Eclipse太臃腫了,而且cdt麻煩。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/36042/showart_396858.html |
|