ACE在CentOS上編譯安裝及配置

2021-05-21 19:41:03 字數 1709 閱讀 9504

(參考了網上很多的內容,在此感謝各位,以下僅將自己的安裝過程分享出來。)

作業系統:

centos 5.4

ace版本:ace 5.7

ace庫:

ace57src.tar.gz

解壓至目標目錄。我解壓至。

#tar zxcf ace57src.tar.gz

安裝前的配置:

#vi /etc/profile

export ace_root

ld_libary_path=$ace_root/ace:$ld_libary_path

export ld_libary_path

編譯安裝:

1.進入

目錄,修改

ace的

config

檔案。

#vi ace/config.h

ace說明)

#define ace_has_standard_cpp_libary 1

#include 「ace/config-linux.h」

儲存後退出。

2.建立

build

資料夾。

#mkdir build

#cd build

3.開始編譯安裝。

#../configure –prefix=/var/prog/ace

(此處利用

configure

命令指定了安裝目錄)

#make

#make install

這個過程大約會持續一段時間。

配置

ace環境:

新建ace.conf

#vi /etc/ld.so.conf.d/ace.conf

在檔案中新增如下內容:

/var/prog/ace/lib

#ldconfig

測試程式:

編寫如下的測試程式:

hello_ace.cpp

#include

#include

using namespace std;

int ace_tmain(int argc, ace_tchar* argv)

編譯:g++ -i/var/prog/ace/include –wall -c -o 「hello_ace.o」 「hello_ace.cpp」

g++ -i$ace_root –l/var/prog/ace/lib -o」helloace」 ./helloace.o -lace -lrt -lpthread

-lace -lrt -lpthread

三個引數必須要加上。

執行:

./helloace

如果執行時,提示找不到

libace-5.7.5.so

,則先檢視一下

/etc/ld.so.conf.d/ace.conf

中是否配置。

最後執行一下

/sbin/ldconfig -v

吧。應該就沒有問題了。

Centos 編譯安裝ACE

這裡只安裝了ace,其他的包沒有涉及。1.tar xvf ace x.x.x.tar.gz 2.設定環境變數 vim bashrc export ace root home yourname export ld library path ld library path ace root ace cd...

Centos編譯安裝ACE

centos編譯安裝ace 這裡只安裝了ace,其他的包沒有涉及。tar xvf ace 6.0.3.tar.gz cd ace wrappers www.2cto.com 針對不同版本建立兩個檔案鏈結 cd ace ln s config linux.h config.h cd include m...

ACE在CentOS下的編譯

這兩天在除錯ace,首先就得在linux平台下編譯ace,看了網上的一些文件,基本都不能用,在此把自己的一些經驗與大家分享。1.linux 平台版本 linux核心版本為 2.6.32 linux版本為centos6.3 ace版本為6.2.0 2.安裝準備 設定環境變數 vi etc profil...