1.從 http://www.cs.wustl.edu/~schmidt/ACE.html 下載ACE-6.1.0.tar.gz,解壓到 ~/local 目錄下linux
tar -zxf ACE-6.1.0.tar.gzvim
獲得~/local/ACE_wrappersbash
2. 設置環境變量app
vim ~/.bashrcpost
export ACE_ROOT=/home/yourname/ACE_wrappersui
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/aceurl
3. 建立文件 $ACE_ROOT/ace/config.h,寫入以下內容spa
#include "ace/config-linux.h"orm
4.建立 platform_macros.GNU
方法一:建立文件 $ACE_ROOT/include/makeinclude/platform_macros.GNU 寫入
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
方法二:利用軟鏈接建立
ln -s $ACE_ROOT/include/makeinclude/platform_macros.GNU $ACE_ROOT/include/makeinclude/platform_linux.GNU
5. 能夠在 platform_macros.GNU 裏寫入 INSTALL_PREFIX=/home/yourname/ace_install_dir/ 來制定輸出目錄
6.## 64位 linux 須要做個小修改:
vim $ACE_ROOT/include/makeinclude/platform_linux.GNU
找到以下幾行
ifeq ($(buildbits),32) FLAGS_C_CC += -m32 LDFLAGS += -m32 endif ifeq ($(buildbits),64) FLAGS_C_CC += -m64 LDFLAGS += -m64 endif
修改成
ifeq ($(buildbits),32) FLAGS_C_CC += -m32 LDFLAGS += -m32 endif ifeq ($(buildbits),64) FLAGS_C_CC += -m64 FLAGS_C_CC += -fPIC LDFLAGS += -m64 endif
7.make && make install