在ubuntu下安装ACE编译环境 和 Eclipse 开发环境
2012-05-07 18:23
495 查看
可以用新立得软件管理工具安装 libace-dev libace-doc这两个包
或者在控制台上用apt-get install libace-dev libace-doc命令来安装
1.使用http://riverace.com/downloads.htm#ace_releases下载下来的ACE包进行编译:
2.先用gedit /home/username/.bashrc 打开脚本文件,并在上面加上一下环境变量
#ACE env
export ACE_ROOT=/home/username/ACE_wrappers
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/lib:/usr/local/lib/sparcv9:/usr/openwin/lib:/usr/lib:/usr/local/lib
export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH};${HOME}/bin"
3.进入 $ACE_ROOT/ace目录,创建一个文本 config.h,内容如下:
#include "ace/config-linux.h"
或者用 ln -s config-linux.h config.h 命令
4.进入$ACE_ROOT/include/makeinclude目录,创建一个文本文件 platform_macros.GNU,内容如下:
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
或者用 ln -s platform_linux.GNU platform_macros.GNU 命令
然后进入ace文件夹
make
make install
进行编译。
如果没有问题,将会在bulid(or ace)文件夹里找到
libACE.so libACE.so.5 libACE.so.5.4.0文件
把 libACE.so.5.*.* 复制 到 /usr/lib 下
-------------------------
不需要这么复杂吧,ACE5.4以后的版本支持GNU Autoconf编译,假设代码在/opt/ACE_wrappers目录下
mkdir /opt/ACE_wrappers/build
cd /opt/ACE_wrappers/build
../configure
make
make install (optional)
就可以了,默认只编译共享库(libACE.so),如果想编译静态库(libACE.a),可以在configure的时候加--enable-static
--
如果报错:
1.如果按照上述说明中的安装方法,第五步可能会出现问题,一般在自行编译源码所碰到的错误都会是系统缺少软件包所致,我所遇到的问题是跟ssl有关系,告警如下: http://www.cnblogs.com/../ace/SSL/SSL_Asynch_BIO.h:29:25: error: openssl/bio.h: 没有那个文件或目录
原因:缺少openssl或者找不到openssl的头文件;
解决:去http://www.openssl.org/source/下载latest程序,经过一番./configure、make、make install安装套路,还有一步为做个链接:
cd /usr/include
ln -s /usr/local/ssl/include/openssl openssl
具体安装流程:
安装openssl
# tar –zxvf openssl
# cd openssl
# ./config --prefix=/usr/local/openssl
# make
# make install
cd /usr/include
ln -s /home/yourusername/bin/openssl/include/openssl openssl
2.又遇到错误,如下:
home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:148: undefined reference to `SSL_read'
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:151: undefined reference to `SSL_get_error'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:305: undefined reference to `SSL_shutdown'
原因:在编译${ACE_ROOT}/objdir/tests/SSL和${ACE_ROOT}/examples/IPC_SAP/SSL_SAP中makefile指定的库路径LIBS指定有误;
解决:找到makefile里的LIBS = -lrt -ldl,在后面添加路径【 /usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a】(注意,这两个静态库路径不是绝对的)。
---
LIBS = -lrt -ldl /home/yourusername/bin/openssl/lib/libssl.a /home/yourusername/bin/openssl/lib/libcrypto.a
------------------------
配置Eclipse:
1. 点击project->properties,打开,在左侧一览中选择C/C++ Build,在TAB列中选择tools settings,
点中gcc c++ compiler中的directories,增加你的ACE根目录 "/home/***/ACE_wrappers"
2. 点中gcc c++ linker
在 libraries (-l) 中 写入 ACE
在 library search path(-L) 中 写入 "/home/***/ACE_wrappers/ace"
完成配置。
转帖:http://hi.baidu.com/dongbeiman/blog/item/1e8e18c7569489cfd100609a.html
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
在ubuntu下有三种方法:
一、可以用新立得软件管理工具安装 libace-dev libace-doc这两个包
二、或者在控制台上用apt-get install libace-dev libace-doc命令来安装
三、手动编译,步骤如下:
1.使用http://riverace.com/downloads.htm#ace_releases下载下来的ACE包进行编译:
2.先用gedit /home/username/.bashrc 打开脚本文件,并在上面加上一下环境变量
#ACE env
export ACE_ROOT=/home/username/ACE_wrappers
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/lib:/usr/local/lib/sparcv9:/usr/openwin/lib:/usr/lib:/usr/local/lib:
export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH};${HOME}/bin"
3.进入 $ACE_ROOT/ace目录,创建一个文本 config.h,内容如下:
#include "ace/config-linux.h"
或者用 ln -s config-linux.h config.h 命令
4.进入$ACE_ROOT/include/makeinclude目录,创建一个文本文件 platform_macros.GNU,内容如下:
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
或者用 ln -s platform_linux.GNU platform_macros.GNU 命令
然后进入ace文件夹
make
make install
进行编译。
如果没有问题,将会在bulid文件夹里找到
libACE.so libACE.so.5 libACE.so.5.4.0文件
原链接:http://blog.csdn.net/tomhsh/archive/2008/07/21/2685718.aspx
或者在控制台上用apt-get install libace-dev libace-doc命令来安装
1.使用http://riverace.com/downloads.htm#ace_releases下载下来的ACE包进行编译:
2.先用gedit /home/username/.bashrc 打开脚本文件,并在上面加上一下环境变量
#ACE env
export ACE_ROOT=/home/username/ACE_wrappers
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/lib:/usr/local/lib/sparcv9:/usr/openwin/lib:/usr/lib:/usr/local/lib
export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH};${HOME}/bin"
3.进入 $ACE_ROOT/ace目录,创建一个文本 config.h,内容如下:
#include "ace/config-linux.h"
或者用 ln -s config-linux.h config.h 命令
4.进入$ACE_ROOT/include/makeinclude目录,创建一个文本文件 platform_macros.GNU,内容如下:
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
或者用 ln -s platform_linux.GNU platform_macros.GNU 命令
然后进入ace文件夹
make
make install
进行编译。
如果没有问题,将会在bulid(or ace)文件夹里找到
libACE.so libACE.so.5 libACE.so.5.4.0文件
把 libACE.so.5.*.* 复制 到 /usr/lib 下
-------------------------
不需要这么复杂吧,ACE5.4以后的版本支持GNU Autoconf编译,假设代码在/opt/ACE_wrappers目录下
mkdir /opt/ACE_wrappers/build
cd /opt/ACE_wrappers/build
../configure
make
make install (optional)
就可以了,默认只编译共享库(libACE.so),如果想编译静态库(libACE.a),可以在configure的时候加--enable-static
--
如果报错:
1.如果按照上述说明中的安装方法,第五步可能会出现问题,一般在自行编译源码所碰到的错误都会是系统缺少软件包所致,我所遇到的问题是跟ssl有关系,告警如下: http://www.cnblogs.com/../ace/SSL/SSL_Asynch_BIO.h:29:25: error: openssl/bio.h: 没有那个文件或目录
原因:缺少openssl或者找不到openssl的头文件;
解决:去http://www.openssl.org/source/下载latest程序,经过一番./configure、make、make install安装套路,还有一步为做个链接:
cd /usr/include
ln -s /usr/local/ssl/include/openssl openssl
具体安装流程:
安装openssl
# tar –zxvf openssl
# cd openssl
# ./config --prefix=/usr/local/openssl
# make
# make install
cd /usr/include
ln -s /home/yourusername/bin/openssl/include/openssl openssl
2.又遇到错误,如下:
home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:148: undefined reference to `SSL_read'
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:151: undefined reference to `SSL_get_error'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:305: undefined reference to `SSL_shutdown'
原因:在编译${ACE_ROOT}/objdir/tests/SSL和${ACE_ROOT}/examples/IPC_SAP/SSL_SAP中makefile指定的库路径LIBS指定有误;
解决:找到makefile里的LIBS = -lrt -ldl,在后面添加路径【 /usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a】(注意,这两个静态库路径不是绝对的)。
---
LIBS = -lrt -ldl /home/yourusername/bin/openssl/lib/libssl.a /home/yourusername/bin/openssl/lib/libcrypto.a
------------------------
配置Eclipse:
1. 点击project->properties,打开,在左侧一览中选择C/C++ Build,在TAB列中选择tools settings,
点中gcc c++ compiler中的directories,增加你的ACE根目录 "/home/***/ACE_wrappers"
2. 点中gcc c++ linker
在 libraries (-l) 中 写入 ACE
在 library search path(-L) 中 写入 "/home/***/ACE_wrappers/ace"
完成配置。
转帖:http://hi.baidu.com/dongbeiman/blog/item/1e8e18c7569489cfd100609a.html
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
在ubuntu下有三种方法:
一、可以用新立得软件管理工具安装 libace-dev libace-doc这两个包
二、或者在控制台上用apt-get install libace-dev libace-doc命令来安装
三、手动编译,步骤如下:
1.使用http://riverace.com/downloads.htm#ace_releases下载下来的ACE包进行编译:
2.先用gedit /home/username/.bashrc 打开脚本文件,并在上面加上一下环境变量
#ACE env
export ACE_ROOT=/home/username/ACE_wrappers
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/lib:/usr/local/lib/sparcv9:/usr/openwin/lib:/usr/lib:/usr/local/lib:
export PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH};${HOME}/bin"
3.进入 $ACE_ROOT/ace目录,创建一个文本 config.h,内容如下:
#include "ace/config-linux.h"
或者用 ln -s config-linux.h config.h 命令
4.进入$ACE_ROOT/include/makeinclude目录,创建一个文本文件 platform_macros.GNU,内容如下:
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
或者用 ln -s platform_linux.GNU platform_macros.GNU 命令
然后进入ace文件夹
make
make install
进行编译。
如果没有问题,将会在bulid文件夹里找到
libACE.so libACE.so.5 libACE.so.5.4.0文件
原链接:http://blog.csdn.net/tomhsh/archive/2008/07/21/2685718.aspx
相关文章推荐
- ubuntu mint 15 编译安装PHP开发环境
- Ubuntu(Linux)下安装jdk并搭建开发环境(Eclipse)
- Ubuntu下安装Android Eclipse开发环境
- ubuntu下Android开发环境的搭建:eclipse+SDK详细安装教程+常见问题及其解决方案
- 如何搭建android的开发环境 虚拟机和ubuntu的安装与建立编译条件
- Ubuntu 14.04 安装搭建Android开发编译环境
- 一键解决Ubuntu下安装Eclipse Android/C/C++ 开发环境
- Ubuntu、CentOS Linux系统安装Erlang,部署Eclipse+Erlide开发环境
- Ubuntu上怎么安装Eclipse Android 开发环境
- 在ubuntu下安装ACE编译环境
- 【转】ubuntu下安装eclipse以及配置python编译环境
- ubuntu 下安装eclipse,并搭建c++/c开发环境
- Ubuntu 安装Java开发环境(jdk1.7 + Eclipse)
- ubuntu14.0.4配置javaweb开发环境第三步安装eclipse
- ubuntu14.04环境python开发环境全站安装(eclipse,pydev,django)
- Ubuntu 11.04 x64 常用软件及编译安装LAMP开发环境
- Ubuntu上怎么安装Eclipse Android 开发环境
- ubuntu安装eclipse、jre、cdt配置C++开发环境
- Ubuntu 12.04安装Java开发环境(jdk1.7 + Eclipse)
- eclipse中配置hadoop开发环境-----删除之前版本的hadoop插件、编译hadoop eclipse插件、安装插件、eclipse下运行hadoop程序