gloox 1.0的 wince编译
来源:互联网 发布:金融方面的数据挖掘 编辑:程序博客网 时间:2024/05/20 07:35
在windows mobile6下编译通过。
1、建立工程。
新建一个mobile空工程。
加进文件就不多说了,将gloox的头文件、和cpp加进目录。
2、配置工程编译属性。
将下载的gloox目录下的config.h.win拷贝一份到工程目录下(不是解决方案目录,这样做的目的是便于以后随便拷贝这个现成的gloox mobile工程)。
配置config.h.win,mobile平台貌似sasl和tls会有点小问题,所以先不用这两个,先编译通过再说,后续再修改。将ssl和tls都注释掉,剩下的文件内容如下:
/* Comment out if you don't have the `setsockopt' function. Usually available. */
#define HAVE_SETSOCKOPT 1
#ifdef _MSC_VER
#pragma comment( lib, "Dnsapi.lib" )
#pragma comment( lib, "Secur32.lib" )
#pragma comment( lib, "Crypt32.lib" )
//#pragma comment( lib, "ws2_32.lib" )
#pragma comment( lib, "ws2.lib" )
#pragma comment( lib, "winsock.lib" )
/* The following silences a few C4355 warnings ('this' : used in member initializer list).
This is only used with Parser which doesn't do anything with its TagHandler in the ctor,
so muting C4355 is safe. */
#pragma warning( disable : 4355 )
/* The following silcences warnings concerning "unsafe" functions (sprintf, strncpy, etc.).
They are used in a safe way here, though. */
#pragma warning( disable : 4996 )
#endif
改完了以后打开config.h,将config.h.win的目录由“../ config.h.win”改成“config.h.win”
2、设置工程属性。 这个根据需要自己配置一下,现在编译应该不用改也可以编译过,加到其他解决方案的时候可能会有问题,到时候看具体问题再具体改吧。
3、编译。 此时编译仍然会报错。解决如下: 1、/dns.cpp(346) : error C3861: 'getprotobyname': identifier not found 添加# include <winsock2.h> 添加#include <sstream> 2、error C2039: 'time' : is not a member of 'std' 将std::time(0)改为time(0) 去掉std 3、clientbase.cpp(502) : error C2440: '=' : cannot convert from 'unsigned char *' to 'unsigned short *' 4、const std::string ClientBase::getID()中time没实现 改成: #ifdef _WIN32_WCE char r[8+1]; sprintf( r, "%08x", rand() ); std::string ret( r, 8 ); return std::string( "uid" ) + ret; #else std::ostringstream oss; oss << ++m_idCount; return std::string( "uid" ) + oss.str(); #endif 至此,gloox1.0上的mobile版本移植完毕。 可以去下载的gloox文件里找个例子跑一下。调例子的时候因为我们没有设置sasl和tls,所以需要将client的sasl和tls设置为false,才能正确登录。 以后有时间会更新添加sasl和tls的解决方案。
- gloox 1.0的 wince编译
- gloox win32编译
- gloox:下载和编译
- 在linux下编译gloox需要的环境
- 在linux下编译gloox需要的环境
- 解决方案--gloox源码编译错误
- wince的编译过程
- wince的编译过程
- gloox的一些资料
- gloox的使用
- GLOOX 1.0 API ----框架
- GLOOX 1.0---注册模块
- GLOOX 1.0 API ----框架
- GLOOX 1.0 API ----框架
- GLOOX 1.0---注册模块
- GLOOX 1.0 API ----框架
- GLOOX 1.0 API ---框架
- Wince的详细编译过程
- 排序算法汇总
- Myeclipse 快捷键汇总
- POJ_2992
- LAJP系列教程-第五部分-架构设计
- C++ 初学者指南 第五篇(12)
- gloox 1.0的 wince编译
- MyEclipse中web开发修改类文件和配置文件不重启服务器的方法
- core dump
- Windows Embedded Standard 7 让智能家电时代到来...
- Word文档损坏?几种方法可以挽回数据
- 如何快速掌握一个开源项目
- 几种办法减少Word容量
- 关于Java和.net的争论
- VS2010中文旗舰正式版 下载地址