實在是很崩潰

兩個月了,我總覺得自己是否無法繼續下去

乾脆不要讀研究所,乾脆畢業去工作好了

為什麼要讀他媽的研究所

天殺的我英文都讀不完了

超想考英文的,為什麼時間都不給我呢

怎麼這麼廢,不懂自己了

當初要好好奮鬥的自己呢,不知道跑到哪裡去了

精神都快崩潰了

其實現在我也不知道我目前在做什麼

簡單說一下我在Ubuntu做的環境編譯吧

編譯 Android OpenCV on Ubuntu 11.04

 
我的Ubuntu的版本是10.04
 
不過我決定還是試看看
 
在安裝的部份我下載這三個東西
 
CMake 2.8.8
 
SWIG 2.0.5
 
Apache-Ant 1.8.3
 
CMake要下載Source distributions這個版本的

載到Binary會沒有configure安裝指令在

接著按照教學步驟一個一個指令去執行

解壓縮:tar –zxvf cmake-2.8.8.tar.gz

cd cmake-2.8.8

./configure –prefix="/opt/tools/cmake-2.8.8"

(上面這個步驟我會發生錯誤,有可能是指令錯誤也有可能是沒有安裝到什麼東西

我的錯誤訊息是

Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
 

How to set C++ environment variable in Linux ubuntu?

我在上面這個網站找到解決辦法,是說系統沒有C++跟gcc,所以必須安裝那些東西才能再安裝cmake

sudo apt-get install build-essential

/configure --prefix="/opt/tools/cmake-2.8.8"

make

sudo make install

即可成功安裝)

 

 

SWIG下載swig-2.0.5.tar.gz

tar –zxvf swig-2.0.4.tar.gz

cd swig-2.0.5

./configure --prefix="/opt/tools/swig-2.0.5"

(然後這裡又發生錯誤,我的錯誤訊息是

configure: error: 
Cannot find pcre-config script from PCRE
 (Perl Compatible Regular Expressions)
 library package. This dependency is 
needed for configure to complete,

Either:
- Install the PCRE developer package
on your system (preferred approach).

- Download the PCRE source tarball
, build and install on your system

as you would for any package
built from source distribution.

- Use the Tools/pcre-build.sh script
to build PCRE just for SWIG to statically

link against. Run 'Tools/pcre-build.sh --help'
for instructions.

(quite easy and does not require privileges
to install PCRE on your system)

- Use configure --without-pcre to disable
regular expressions support in SWIG

(not recommended).
 

根據網路上的資料,選擇不被建議的方法加入參數"--winout -pcre"

./configure --without -pcre --prefix="/opt/tools/swig-2.0.5"

make

sudo make install

成功安裝)

 

 

Apache-Ant 1.8.3 這個下載apache-ant-2.8.8-bin.tar.gz解壓縮就好

tar –zxvf apache-ant-1.8.2-bin.tar.gz


接著是將http://code.opencv.org/svn/opencv/trunk/opencv/ check out下來

必須使用到svn,這個工具我只在windows上用過

這個有點像是網路磁碟,將檔案放在網路上利用svn指令抓到自己PC上

在Ubuntu呢,Ubuntu-Subversion

這個網頁有介紹一些用法

我則是直接安裝,然後抓下來

sudo apt-get install subversion libapache2-svn

建立資料夾

mkdir opencv

cd opencv

svn co http://code.opencv.org/svn/opencv/trunk/opencv/


再來設定環境變數,目前做到這一步

抓取opencv有點慢得等下班再來用了

arrow
arrow
    全站熱搜

    glitterHsin 發表在 痞客邦 留言(0) 人氣()