1.环境html
CentOS-6.5-x86_64-bin-DVD1.isolinux
VMware_workstation_full_12.5.2 (2).exevim
ACE-6.4.2.tar.gzbash
下载连接:http://download.dre.vanderbilt.edu/app
2.解压测试
tar zxvf ACE-6.4.2.tar.gz网站
以后会出现一个名字为ACE_wrappers的文件夹ui
这样全部ACE的源文件都在/home/用户名/Software/ACE_wrappers里面spa
3.配置编译环境变量.net
#vim /etc/profile,而后增长以下内容
ACE_ROOT = /home/bigbear/ACE_wrappers export ACE_ROOT export LD_LIBRARY_PATH =/usr/local/lib:$ACE_ROOT/lib:$LD_LIBRARY_PATH
使环境变量当即生效source ./etc/profile
4.添加配置文件
在$ACE_ROOT/ace目录中输入vi config.h建立config.h文件,写入:
#include "ace/config-linux.h"
而后保存。
在$ACE_ROOT/include/makeinclude目录中建立一个名为platform_macros.GNU的文件,写入:
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
而后保存
5.make
6.配置安装输出目录
环境变量添加
INSTALL_PREFIX=/usr/local
export INSTALL_PREFIX
使当即生效
7.make install
若是报错
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.
上面6步骤没有作好
8.测试
建立helloworld.cpp,写入如下内容:
#include "ace/Log_Msg.h"
int ACE_TMAIN(int argc, char* argv[])
{
ACE_DEBUG((LM_DEBUG, ACE_TEXT("Hello World bigbear!\n")));
return 0;
}
输入#g++ helloworld.cpp -o hello -l ACE
再输入# ./hello
9.参考
《ACE-6.1.0 linux 下的编译与安装步骤》http://www.cnblogs.com/liangxiaxu/archive/2013/03/07/2948417.html
官方网站写的编译方法:http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix
《ACE在Linux 和 Windows 下ACE的编译》http://blog.csdn.net/zklth/article/details/7190927