1.从 http://www.cs.wustl.edu/~schmidt/ACE.html 下载ACE-6.1.0.tar.gz,解压到 ~/local 目录下
tar -zxf ACE-6.1.0.tar.gz
得到~/local/ACE_wrappers
2. 设置环境变量
vim ~/.bashrc
export ACE_ROOT=/home/yourname/ACE_wrappers
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/ace
3. 创建文件 $ACE_ROOT/ace/config.h,写入如下内容
#include "ace/config-linux.h"
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