生成适用symbian 的gloox.lib库文件

环境需求:

Symbian SDKS60_3rd_FP2_SDK_v1.1

IDE : carbide 2.7

Perl :ActivePerl-5.6.1.635-MSWin32-x86.msi

Open C/C++ 插件: s60_open_c_cpp_plug_in_v1_7_en.zip

 

Gloox api代码包:  gloox1.0

 

 

Gloox.lib`文件生成过程

 

1 下载一下各软件包。

2 按照正常symbian开发环境搭建好开发环境,

3 安装open c/c++插件,根据安装提示一步一步安装即可。(插件是必须的,之前就是不清楚插件是必须的费了不少周折)

4 新建一个lib工程来生成gloox .lib

  Carbide IDE 中依次 File-NEW->Symbian OS C++ Project -> General Symbian OS->Basic static library(LIB) ->Project name: gloox   Next -> 选择需要的sdk-> Next  ->Next ->finish

这样就生成所需的工程。

5 gloox 1.0 src目录下的cpp文件全部复制到新建工程的src目录下, 不包括 src目录下examplestests文件夹的内容。

6 gloox   src目录下.h 文件全部复制到新建工程的inc目录下。

7 gloox 1.0 根目录下 config.h.symbian config.h.unix.in config.h.win三个文件复制到inc文件目录下。

8 将新建工程 inc目录下 config.h文件内容改为

#ifndef CONFIG_H__

#define CONFIG_H__

 

#if ( defined _WIN32 ) && !defined( __SYMBIAN32__ )

# include "config.h.win"

#elif defined( _WIN32_WCE )

# include "config.h.win"

#elif defined( __SYMBIAN32__ )

# include "onfig.h.symbian"

#else

# include "config.h.unix" // run ./configure to create config.h.unix

#endif

 

#endif // CONFIG_H__

 

9将新建工程 group文件夹下

Gloox.mmp 的内容改为:

TARGET       gloox.lib

TARGETTYPE   lib

UID        0

 

 

CAPABILITY  ReadUserData LocalServices NetworkServices WriteUserData UserEnvironment

 

USERINCLUDE   ../inc

SYSTEMINCLUDE   /epoc32/include

SYSTEMINCLUDE /epoc32/include/stdapis/openssl

SYSTEMINCLUDE /epoc32/include/stdapis

SYSTEMINCLUDE /epoc32/include/stdapis/sys

SYSTEMINCLUDE /epoc32/include/stdapis/stlport

 

 

#ifdef ENABLE_ABIV2_MODE

DEBUGGABLE_UDEBONLY

#endif

SOURCEPATH ../src

SOURCE adhoc.cpp amp.cpp annotations.cpp attention.cpp base64.cpp bookmarkstorage.cpp capabilities.cpp chatstate.cpp chatstatefilter.cpp client.cpp clientbase.cpp component.cpp compressiondefault.cpp compressionzlib.cpp connectionbosh.cpp connectionhttpproxy.cpp connectionsocks5proxy.cpp connectiontcpbase.cpp connectiontcpclient.cpp connectiontcpserver.cpp connectiontls.cpp connectiontlsserver.cpp dataform.cpp dataformfield.cpp dataformfieldcontainer.cpp dataformitem.cpp dataformreported.cpp delayeddelivery.cpp disco.cpp dns.cpp error.cpp eventdispatcher.cpp featureneg.cpp flexoff.cpp gloox.cpp gpgencrypted.cpp gpgsigned.cpp inbandbytestream.cpp instantmucroom.cpp iq.cpp jid.cpp lastactivity.cpp logsink.cpp md5.cpp message.cpp messageevent.cpp messageeventfilter.cpp messagefilter.cpp messagesession.cpp mucmessagesession.cpp mucroom.cpp mutex.cpp nickname.cpp nonsaslauth.cpp oob.cpp parser.cpp prep.cpp presence.cpp privacyitem.cpp privacymanager.cpp privatexml.cpp pubsubevent.cpp pubsubitem.cpp pubsubmanager.cpp receipt.cpp registration.cpp rosteritem.cpp rostermanager.cpp search.cpp sha.cpp shim.cpp simanager.cpp siprofileft.cpp socks5bytestream.cpp socks5bytestreammanager.cpp socks5bytestreamserver.cpp softwareversion.cpp stanza.cpp stanzaextensionfactory.cpp subscription.cpp tag.cpp tlsdefault.cpp tlsgnutlsbase.cpp tlsgnutlsclient.cpp tlsgnutlsclientanon.cpp tlsgnutlsserveranon.cpp tlsopensslbase.cpp tlsopensslclient.cpp tlsopensslserver.cpp tlsschannel.cpp uniquemucroom.cpp util.cpp vcard.cpp vcardmanager.cpp vcardupdate.cpp xhtmlim.cpp

 

LIBRARY libc.lib euser.lib libssl.lib libcrypto.lib libz.lib libstdcpp.lib

 

OPTION CW -wchar_t on

MACRO  _WCHAR_T_DECLARED

 

10. 编译新建工程.

   编译结束后,会在sdk

目录 S60_3rd_FP2_SDK_v1.1/epoc32/release/winscw/udeb

和目录 S60_3rd_FP2_SDK_v1.1/epoc32/release/winscw/urel

生成 gloox.lib文件。

 

Gloox.lib库文件使用

1 建立一个名为 registere_example  Open C console application.工程

 

2 下面是更改后的register_example.cpp 文件

/*

 ============================================================================

 Name      : register_example.cpp

 Author   : warren

 Copyright   :

 Description : Exe source file

 ============================================================================

 */

 

//  Include Files 

 

#include "register_example.h"

#include <e32base.h>

#include <e32std.h>

#include <e32cons.h>        // Console

 

//  Constants

 

_LIT(KTextConsoleTitle, "Console");

_LIT(KTextFailed, " failed, leave code = %d");

_LIT(KTextPressAnyKey, " [press any key]/n");

 

//  Global Variables

 

LOCAL_D CConsoleBase* console; // write all messages to this

 

 

#include <client.h>

#include <connectionlistener.h>

#include <registration.h>

#include <logsink.h>

#include <loghandler.h>

using namespace gloox;

#include <stdio.h>

#include <locale.h>

#include <string>

 

#include <cstdio> // [s]print[f]

 

class RegTest : public RegistrationHandler, ConnectionListener, LogHandler

{

  public:

    RegTest() {}

    virtual ~RegTest() {}

 

    void start()

    {

// README

// to create an account:

// - create the Client instance by passing it the server only, e.g. j = new Client( "example.net" );

// - in onConnect() (or some similar place) call Registration::fetchRegistrationFields()

// - in RegistrationHandler::handleRegistrationFields() set up an RegistrationFields struct

//   with the desired username/password and call Registration::createAccount()

 

// to change an account's password:

// - connect to the server as usual

// - in onConnect() or at any later time call Registration::changePassword()

 

// to delete an account:

// - connect to teh server as usual

// - in onConnect() or at any later time call Registration::removeAccount()

 

// be sure to read the API documentation for class Registration!

 

      j = new Client( "125.65.108.10" );

      j->disableRoster();

      j->registerConnectionListener( this );

 

      m_reg = new Registration( j );

      m_reg->registerRegistrationHandler( this );

 

      j->logInstance().registerLogHandler( LogLevelDebug, LogAreaAll, this );

 

      j->connect();

 

      delete( m_reg );

      delete( j );

    }

 

    virtual void onConnect()

    {

//       requesting reg fields

     m_reg->fetchRegistrationFields();

 

      // changing password

//        m_reg->changePassword( j->username(), "test" );

 

      // unregistering

//       m_reg->removeAccount();

    }

 

    virtual void onDisconnect( ConnectionError e ) { printf( "register_test: disconnected: %d/n", e ); }

 

    virtual bool onTLSConnect( const CertInfo& info )

    {

      printf( "status: %d/nissuer: %s/npeer: %s/nprotocol: %s/nmac: %s/ncipher: %s/ncompression: %s/n",

              info.status, info.issuer.c_str(), info.server.c_str(),

              info.protocol.c_str(), info.mac.c_str(), info.cipher.c_str(),

              info.compression.c_str() );

      return true;

    }

 

    virtual void handleRegistrationFields( const JID& /*from*/, int fields, std::string instructions )

    {

      printf( "fields: %d/ninstructions: %s/n", fields, instructions.c_str() );

      RegistrationFields vals;

      vals.username = "luke";

      vals.password = "luke";

      m_reg->createAccount( fields, vals );

    }

 

    virtual void handleRegistrationResult( const JID& /*from*/, RegistrationResult result )

    {

      printf( "result: %d/n", result );

      j->disconnect();

    }

 

    virtual void handleAlreadyRegistered( const JID& /*from*/ )

    {

      printf( "the account already exists./n" );

    }

 

    virtual void handleDataForm( const JID& /*from*/, const DataForm& /*form*/ )

    {

      printf( "datForm received/n" );

    }

 

    virtual void handleOOB( const JID& /*from*/, const OOB& oob )

    {

      printf( "OOB registration requested. %s: %s/n", oob.desc().c_str(), oob.url().c_str() );

    }

 

    virtual void handleLog( LogLevel level, LogArea area, const std::string& message )

    {

      printf("log: level: %d, area: %d, %s/n", level, area, message.c_str() );

    }

 

  private:

    Registration *m_reg;

    Client *j;

};

 

 

 

 

//  Local Functions

 

LOCAL_C void MainL()

    {

    //

    // add your program code here, example code below

    //

   

    console->Write(_L("Hello, world!/n"));

   

    RegTest *r = new RegTest();

      r->start();

      delete( r );

    }

 

LOCAL_C void DoStartL()

    {

    // Create active scheduler (to run active objects)

    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();

    CleanupStack::PushL(scheduler);

    CActiveScheduler::Install(scheduler);

 

    MainL();

 

    // Delete active scheduler

    CleanupStack::PopAndDestroy(scheduler);

    }

 

//  Global Functions

 

GLDEF_C TInt E32Main()

    {

    // Create cleanup stack

    __UHEAP_MARK;

    CTrapCleanup* cleanup = CTrapCleanup::New();

 

    // Create output console

    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(

           KConsFullScreen, KConsFullScreen)));

    if (createError)

       {

       delete cleanup;

       return createError;

       }

 

    // Run application code inside TRAP harness, wait keypress when terminated

    TRAPD(mainError, DoStartL());

    if (mainError)

       console->Printf(KTextFailed, mainError);

    console->Printf(KTextPressAnyKey);

    console->Getch();

 

    delete console;

    delete cleanup;

    __UHEAP_MARKEND;

    return KErrNone;

    }

3 mmp文件改为

 

TARGET       register_example.exe

TARGETTYPE   exe

UID        0 0xEDD3EA82

 

USERINCLUDE   ../inc

 

SYSTEMINCLUDE /epoc32/include

SYSTEMINCLUDE /epoc32/include/gloox

SYSTEMINCLUDE /epoc32/include/stdapis/openssl

SYSTEMINCLUDE /epoc32/include/stdapis

SYSTEMINCLUDE /epoc32/include/stdapis/sys

SYSTEMINCLUDE /epoc32/include/stdapis/stlport

 

SOURCEPATH   ../src

SOURCE       register_example.cpp

 

LIBRARY       euser.lib gloox.lib

LIBRARY     libc.lib  libssl.lib libcrypto.lib libz.lib libstdcpp.lib

 

#ifdef ENABLE_ABIV2_MODE

  DEBUGGABLE_UDEBONLY

#endif

 

红色字体为改动的部分。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我! 基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip基于Django+python编写开发的毕业生就业管理系统支持学生教师角色+db数据(毕业设计新项目).zip
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值