红联Linux门户
Linux帮助

CentOS 5 编译ACE5.5

发布时间:2007-10-14 20:46:38来源:红联作者:cights
1 在ACE的老巢下载下面的压缩包 :ACE-5.4.tar.gz

2 tar -xcvf ./ACE-5.4.tar.gz后生成一个目录ACE_wrappers,
假定我们的目录是/root/ace_study/ACE_wrappers
为保险起见执行chmod a=rwx -R ACE_wrappers

3 在etc/profile文件中这样写

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#下面这行是要加的
pathmunge /root/ace_study/ACE_wrappers
fi

#下面这两行是要加上的
ACE_ROOT=/root/ace_study/ACE_wrappers;
export ACE_ROOT

退出,注销CentOS 5;

4 在$ACE_ROOT目录中的ace目录下生成文件config.h,在这个文件中要包含一句话

#include "ace/config-linux.h"

5 在$ACE_ROOT目录中的include/makeinclude目录下生成文件platform_macros.GNU

在这个文件中要包含一句话
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

6 进入$ACE_ROOT/ace目录

7 执行 make debug=0

8 执行后会生成libACE.so,这就是我们生成的动态库

9 以后使用的时候别忘了头文件的包含目录和so所在的库目录噢

10 在lib下,可以看到生成的库:libACE.so libACE.so.5.5.0
文章评论

共有 0 条评论