歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux 下編譯安裝ACE時遇到的問題及解決

Linux 下編譯安裝ACE時遇到的問題及解決

日期:2017/2/28 16:03:43   编辑:Linux教程

首先把文件解壓,我解壓在了/Software文件夾下,解壓後會出現一個名字為ACE_wrappers的文件夾。這樣所有ACE的源文件都在/Software/ACE_wrappers裡面

1.1 配置環境變量:

# vi /etc/profile

增加如下的內容

ACE_ROOT=/Software/ACE_wrappers ------就是上面存放ACE源文件的目錄

export ACE_ROOT

LD_LIBARY_PATH=$ACE_ROOT/ace:$LD_LIBARY_PATH

export LD_LIBARY_PATH

# source /etc/profile

1.2 開始安裝ACE

# cd /Software/ACE_wrappers

# vi ace/config.h

增加如下信息:

#include “ace/config-linux.h”

如果想用MSVC標准C++頭,www.linuxidc.com則需要在ace/config.h中增加定義:

#define ACE_HAS_STANDARD_CPP_LIBARY 1

我的config.h文件內容如下:

#define ACE_HAS_STANDARD_CPP_LIBARY 1 // 使用標准C++頭

#define ACE_NO_INLINE // 不使用內連函數,能減小LIB和EXE的大小

#include “ace/config-linux.h”

保存後退出

# mkdir build ----新建一個build文件夾

# cd build

# ../configure --prefix=/usr/local/ACE -------在這裡我指定了ACE的安裝路徑

# make & install

第一個問題,在make的時候找不到了ssl這個東西。。這個ssl具體來說是網絡上一個安全協議。系統默認是安裝的,但是我在編譯時候一直出現這個問題,原來是打開了。我的版本號是6.0的。所以,經過查找幫助文檔,configure這個配置的時候

--enable-ssl (yes): Include the ACE_SSL library when building ACE. Requires the SSL components to be available using the compiler's and linker's default search directories.

--with-openssl: Specifies the root directory of the OpenSSL installation; expects the specified directory to have include and lib subdirectories. To specify other locations for the header and libraries, use one or both of the following.

--with-openssl-include: Specify the directory containing the OpenSSL header files.

--with-openssl-libdir: Specify the directory containing the OpenSSL libraries.

應該關閉它命令如下../configure --disable-ssl

在進行編譯,就會成功了。

Copyright © Linux教程網 All Rights Reserved