转自:http://blog.csdn.net/fastxyf/article/details/749040
VC 编译gloox
我用的是VC的编译器,VC6 + sp5 + pp5,PlatForm SDK 2003,这是我的配置,不是必须配置
1.下载编译 iksemel http://iksemel.jabberstudio.org/
我用的是1.2版
a.在include/common.h,的开头,加入
#ifdef WIN32 #include <stdarg.h> #include <stdlib.h> #include <errno.h> #include <string.h> #define strncasecmp strnicmp #define strcasecmp stricmp #endif
b.创建一个新的VC工程,装src,include目录下的所有文件加进去
c.lib引用里要包含ws2_32.lib
d.编译
2.下载编译 gloox http://camaya.net/glooxdownload
我用的是0.8版
a.在VC的环境里,设置iksemel 的Include,和LIB的路径
b.在Project Settings->C/C++->C++ Language里
选上"Enable Run-Time Type Information(RTTI)"
c.更改src/compression.cpp 里
m_inflateBuffer.clear();改为 m_inflateBuffer.erase();
这个是在我的机上编译不通过,官方并没有要求这么改
d.编译
还有一些可选的功能模块
# GnuTLS (recommended, v1.2.x, for TLS support) # OpenSSL (optional, v0.9.8, for TLS support) # LibIDN (recommended, v0.5.x, for JID prepping) # Zlib (optional, v1.2.3, for Stream Compression)
如果装了,设置包含路径,再在config.h.win文件里修改相应的宏定义就可以了
编译后生成gloox.lib,并没有完整的客户端可测试.src/tests里有一些功能模块的测试。
(###)