我们常常在各种开源站点下载到源代码程序,通常为*.tar.gz格式,这里以一份用于Audio的开源代码库(libsndfile)的编译安装为例,说明源代码的编译安装过程。- Q: i+ B1 R& q/ `8 h
# I5 a& S+ P5 }9 C: M% {% ?9 u: P
" {5 K e2 y7 H0 t6 c+ u: K: R Step1:打开README文件,几乎所有的开放源代码中都含有该文件。别的不看,我们找到以下几行,2 Q; i0 o- E- ?( h/ w- i: r" g
* V6 g$ g; A0 c. n" p
$ m$ L9 r% b3 s3 N4 T. J& C3 l If you really do need to compile from source it should be as easy as: 8 j# |# @( C7 u ./configure + L# _2 o4 R ^$ H" S ? make ; \% S# F }2 z/ z2 V* Q make install$ `+ {. G' ~5 k3 e
3 ]. x# V0 L! a7 B- ~
+ ?7 ]" o- `: b) y8 A' K8 a Since libsndfile optionally links against libFLAC, libogg and libvorbis, you( B& E" w7 C/ Z' l. L0 {. f
will need to install appropriate versions of these libraries before running 0 X* Q5 |. f- R& \9 b# A configure as above." F! t% l0 N* T& i
9 S Z1 \* C5 f' z