linux下編譯安裝ACE6

2021-07-22 05:18:48 字數 1265 閱讀 6340

我用的系統是ubuntu12.04,選擇的ace版本是6.3.1。

儲存在/home/使用者名稱/software資料夾下。

3.配置環境變數。#vi /etc/profile,然後增加如下內容:

注意由於每個人的使用者名稱不同,這裡會稍有不同,例如我的路徑前面有/home/jyx

export ace_root ----匯出環境變數

ld_library_path=$ace_root/lib:$ld_library_path

export ld_library _path ----匯出環境變數

輸入#source /etc/profile 使環境變數生效

輸入#echo  $ace_root命令檢視環境變數是否新增成功

4. 在$ace_root/ace目錄中輸入vi config.h建立config.h檔案,寫入:

#include "ace/config-linux.h"

然後儲存。

5. 在$ace_root/include/makeinclude目錄中建立乙個名為platform_macros.gnu的檔案,寫入:

include $(ace_root)/include/makeinclude/platform_linux.gnu

6.make

7. make install

如果在makeinstall時出現這樣的錯誤:

the variable install_prefix must be set to install.

if binaries are already built and you wantto use rpath,

they must be rebuilt after changinginstall_prefix.

make[1]: *** [install] 錯誤 1

make: *** [install] 錯誤 2

解決辦法:環境變數中新增:

install_prefix=/usr/local

export install_prefix

再安裝。

8.測試安裝是否成功

建立helloworld.cpp,寫入以下內容:

#include "ace/log_msg.h"

int ace_tmain(int argc, char* argv)

輸入#g++ helloworld.cpp -o hello -l ace

再輸入# ./hello

如果看到螢幕上打出「hello world!」則代表安裝的ace可用。

ACE在Linux下編譯安裝

ace版本 ace 5.6 安裝過程 設定環境變數 看使用者使用的是那種shell環境,我比較喜歡用csh的所以在.cshrc檔案中新增ace root環境變數 bash的在.bashrc裡配置 export mpc root ace root mpc export ld library path ...

AS 4下編譯安裝ACE

如果用bash vi bash profile 儲存,後 bash profile 編譯ace 1.選擇平台配置檔案,本系統應該選擇config linux.h,在 ace root ace 目錄下新建config.h檔案,在config.h中加入一行 include config linux.h ...

ACE編譯安裝

tar zxf ace 6.1.0.tar.gz 2.設定環境變數 vim bashrc export ace root home yourname export ld library path ld library path ace root ace 3.建立檔案 ace root ace con...