linux下编译ACE
来源:互联网 发布:所以国家域名后缀 编辑:程序博客网 时间:2024/06/08 04:52
ACE-Linux库:http://download.csdn.net/download/yuanchunsi/9950130
ACE-6.4.0 linux下编译与安装
1. 从 http://www.cs.wustl.edu/~schmidt/ACE.html 的 Obtainin ACE 链接处下载ACE源码,我下载的是ACE-6.4.0.tar.gz2. 假设下载的目录为~/source/ace
3. 解压ACE源码 tar zxvf ACE-6.4.0.tar.gz,解压后发现ace源码解压到~/source/ace/ACE_wrappers目录下
4. 参考http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix 在linux环境下对ACE进行编译
4.1 设置环境变量
vim ~/.bash_profile
export ACE_ROOT=/home/yourname/ACE_wrappers
export LD_LIBRARY_PATH=/usr/local/lib:$ACE_ROOT/lib:$LD_LIBRARY_PATH
然后执行source ~/.bash_profile
4.2 创建文件 $ACE_ROOT/ace/config.h,写入如下内容#ifndef _CONFIG_H_
#define _CONFIG_H_
#include "ace/config-linux.h"
#endif
4.3 创建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
可以在platform_macros.GNU写入INSTALL_PREFIX=/usr/local,将ace的include lib share安装到/usr/local目录下
4.4 make4.5 切换到root,因为只有root才可以写文件到/usr/local,并设置环境变量
su root
export ACE_ROOT=/home/yourname/ACE_wrappers
make install
切换到/usr/local,进入include lib share可以看到ace的相关文件
4.6 上面使用$ACE_ROOT/lib作为ace的库文件路径,因为后面我们安装到/usr/local/lib里,可以把/usr/local/lib加入默认库文件查找路径
打开/etc/ld.so.conf
本来内容是如下:
include ld.so.conf.d/*.conf
我们添加ace路径后变成如下
include ld.so.conf.d/*.conf
/usr/local/lib
保存退出!
然后执行 ldconfig就可以了。
5. 测试
下面我们弄一个简单的ace程序:
/root/hello.cpp:
#include "ace/OS.h"
#include "ace/Log_Msg.h"
int main (int argc, char *argv[])
{
ACE_DEBUG((LM_DEBUG,"Hello, ACE!\n "));
ACE_OS::exit(1);
return 0;
}
这么就不写makefile了,直接用g++编译就是了。
编译
g++ hello.cpp -o hello -lACE
运行:
./hello
运行,输出了Hello, ACE! 哈哈~got it!
《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
- linux下编译ACE
- linux下 编译 ace
- Linux 下编译ACE
- linux下编译ACE
- linux下ACE 6.2编译
- ace在linux下编译
- 【ACE】Linux 和 Windows 下ACE的编译.
- ACE应用在Linux下编译事项
- ACE在Linux下编译安装
- ACE在Linux下编译及实例
- ACE在Linux下编译安装
- ACE在Linux下编译安装
- linux下编译debug版本的ace
- linux 下ACE编译及问题解决
- ACE在Linux下编译安装
- linux下ACE工具包的编译安装
- WINDOWS 下编译ace
- ACE在Linux 编译
- PHP for循环历遍数组和 foreach历遍数组
- sqlserver数据库一致性错误修复
- java数据结构:表、栈、队列
- Javascript的this用法
- maven下载源代码,解决中文注释为乱码的问题
- linux下编译ACE
- python watchdog监控文件系统变动
- Hadoop集群安装
- SQL:Oracle层次查询总结 connect by
- uva 10305 拓扑排序(五种方式实现,全面理解邻接表+BFS实现+DFS实现)
- oracle--in与not in 语句 关于空值问题记录
- linux下的五种模型https://www.ziwenxie.site/2017/01/02/unix-network-programming-asynchronous/?nsukey=u352Le
- MTCNN人脸及特征点检测---代码应用详解(基于ncnn架构)
- 总结:数据清洗的一些总结