×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Help with RSensAS

    Hi guys help please...I want to send an sms to a particular mobile number and currently i have the code below
    Code:
    #include <rsendas.h>
    #include <rsendasmessage.h>
    #include <senduiconsts.h>
    
    
    	RSendAs saSrv;
    	saSrv.Connect();
    	CleanupClosePushL(saSrv);
    	       
    	// Create your message
    	RSendAsMessage msg;
    	msg.CreateL(saSrv, KSenduiMtmSmsUid);
    	CleanupClosePushL(msg);
    	
        TBuf<15> aRecipientNumber;
        aRecipientNumber.Copy(_L("09175202289"));
    	msg.AddRecipientL(aRecipientNumber,RSendAsMessage::ESendAsRecipientTo);
    	
    	TBuf<512> aMessageText;
    	aMessageText.Copy(_L("test message"));
    	msg.SetBodyTextL(aMessageText);
    	 
    	// Send the message
    	msg.SendMessageAndCloseL();
    	       
    	// Cleanup
    	CleanupStack::Pop(&msg);
    	CleanupStack::PopAndDestroy(&saSrv);
    But there are errors after i compile it...

    ERROR:
    1]
    Creation Time Description Resource Path Location Type
    1239151838453 undefined reference to `RSendAs::Connect()' SmsBlasterContainerView.cpp SmsBlaster/src line 372 C/C++ Problem

    2]
    Creation Time Description Resource Path Location Type
    1239151838484 undefined reference to `RSendAsMessage::CreateL(RSendAs&, TUid)' SmsBlasterContainerView.cpp SmsBlaster/src line 377 C/C++ Problem

    3]
    Creation Time Description Resource Path Location Type
    1239151838500 undefined reference to `RSendAsMessage::AddRecipientL(TDesC16 const&, RSendAsMessage::TSendAsRecipientType)' SmsBlasterContainerView.cpp SmsBlaster/src line 382 C/C++ Problem

    4]
    Creation Time Description Resource Path Location Type
    1239151838515 undefined reference to `RSendAsMessage::SetBodyTextL(TDesC16 const&)' SmsBlasterContainerView.cpp SmsBlaster/src line 386 C/C++ Problem

    5]
    Creation Time Description Resource Path Location Type
    1239151838546 undefined reference to `RSendAsMessage::SendMessageAndCloseL()' SmsBlasterContainerView.cpp SmsBlaster/src line 389 C/C++ Problem

    6]
    Creation Time Description Resource Path Location Type
    1239151838562 undefined reference to `RSendAsMessage::Close()'[/S60/devices/S60_5th_Edition_SDK_v1.0_2/epoc32/include/e32base.inl] SmsBlaster line 3140 C/C++ Problem
    I already included the necessary header files, but of course im not sure if those are the only necessary files to get it working...Can anybody please help me to get this working? Thanks in advance!

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Help with RSensAS

    Did you link to sendas2.lib? If not then add that entry in your .mmp file as follows.

    Code:
    LIBRARY sendas2.lib
    Nokia Developer Wiki Moderation team

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Help with RSensAS

    .h : declaration
    .cpp or .lib : definition
    So the message "undefined reference" is about the latter one. Check the SDK Help about which .lib file(s) you need for using the classes in question.

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Re: Help with RSensAS

    That works! Thanks so much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×