在linux下编译gloox需要的环境

来源:互联网 发布:mysql in和and起冲突 编辑:程序博客网 时间:2024/05/17 22:14

下载地址:

http://camaya.net/gloox/download

 

【流程 】

1、Zlib下载并安装

2、下载openssl编译并安装

3、下载gloox编译并安装如果支持openssl需要按照如下编译

     ./configure --with-openssl=/usr/local/ssl --with-zlib --enable-static

 

 

编译时候如果出现

dso_dlfcn.c:(.text+0x2e5): undefined reference to `dlsym'

可以在Makefile中加上-ldl

 

LIBS = -lresolv -lresolv   -lssl -lcrypto -lz

后面加上

-ldl

即是

LIBS = -lresolv -lresolv   -lssl -lcrypto -lz -ldl

 

【关于dl lib参考以下】

/*********************************************************

Linux 提供 4 个库函数( dlopen , dlerror , dlsym 和 dlclose ),一个 include 文件( dlfcn.h )以及两个共享库(静态库 libdl.a 和动态库 libdl.so ),以支持动态链接装入器。这些库函数是:

  • dlopen 将共享目标文件打开并且映射到内存中,并且返回句柄
  • dlsym返回一个指向被请求入口点的指针
  • dlerror 返回 NULL 或者一个指向描述最近错误的 ASCII 字符串的指针
  • dlclose关闭句柄并且取消共享目标文件的映射

动态链接装入器例程 dlopen 需要在文件系统中查找共享目标文件以打开文件并创建句柄。有 4 种方式用以指定文件的位置:

  • dlopen call 中的绝对文件路径
  • 在 LD_LIBRARY_PATH 环境变量中指定的目录中
  • 在 /etc/ld.so.cache 中指定的库列表之中
  • 先在 /usr/lib 之中,然后在 /lib 之中

*********************************************************/

算了,好好研究下gloox的API函数吧,这忙活一天对这个还不熟悉,不知道需要给什么接口,也没啥经验,熟悉熟悉API函数先,不懂再问问,加油!


gloox 支持基于老旧的XEP-0078定义的IQ认证,也支持SASL的机制。更多内容请参考Client类文档。Sending and Receiving fo Chat Messages ( 聊天消息的收发 )
对于消息传递,建议使用MessageSession虚拟接口类。它处理消息的收发,消息事件和聊天状态。
更多细节请参阅MessageSession文档。Protocol Enhancements(XEPs)(扩展协议)
XMPP标准基金会发布了许多核心协议的扩展,称为XMPP Extension Protocols(XEPs)(XMPP扩展协议)。
几个扩展协议己经在gloox中得到实现。    * XEP-0004 Data Forms
    * XEP-0012 Last Activity
    * XEP-0013 Flexible Offline Message Retrieval
    * XEP-0022 Message Events (see MessageSession for examples)
    * XEP-0027 Current Jabber OpenPGP Usage (see GPGSigned and GPGEncrypted )
    * XEP-0030 Service Discovery
    * XEP-0045 Multi-User Chat
    * XEP-0047 In-Band Bytestreams
    * XEP-0048 Bookmark Storage
    * XEP-0049 Private XML Storage
    * XEP-0050 Ad-hoc Commands
    * XEP-0054 vcard-temp
    * XEP-0065 SOCKS5 Bytestreams , used with File Transfer and HTTP and SOCKS5 Proxy support
    * XEP-0066 Out of Band Data
    * XEP-0077 In-Band Registration
    * XEP-0078 Non-SASL Authentication (automatically used if the server does not support SASL)
    * XEP-0083 Nested Roster Groups (automatically used if supported by the server. see RosterManager )
    * XEP-0085 Chat State Notifications (see MessageSession for examples)
    * XEP-0091 Delayed Delivery (old spec)
    * XEP-0092 Software Version (integrated into Service Discovery )
    * XEP-0095 Stream Initiation , used with File Transfer
    * XEP-0096 File Transfer
    * XEP-0114 Jabber Component Protocol
    * XEP-0138 Stream Compression (used automatically if gloox is compiled with zlib and if the server supports it)
    * XEP-0145 Annotations
    * XEP-0153 vCard-based Avatars
    * XEP-0203 Delayed Delivery (new spec)File Transfer  (文件传输)为了文件传输,gloox 实现了XEP-0095(流初始化)以及XEP-0096(文件传输)的信号机制,
为传输实现了XEP-0065(SOCKS5 Bytestreams 流字节)。参考 SIProfileFT类。
另外,XEP-0047(In-Band Bytestreams)的实现目前在XEPs 0095 和 0096的信号上还不完整。
所以,gloox也许不适合向远程传送文件。参考InBandBytestreamManager类。HTTP and SOCKS5 Proxy support (http和socks5代理支持 )
gloox 有能力穿过http及SOCKS5代理,即便是连锁代理。参考ConnectionHTTPProxy类 和 ConnectionSocks5Proxy类

0 0
原创粉丝点击