943,590 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 332
  • C++ RSS
Jun 16th, 2009
0

error while compiling...

Expand Post »
Quote ...
In function `DefaultDialogHandler::handleCommandString(CommandString&)':
/home/ws14/Desktop/trunk/test/test1/test2/test3/test4/DefaultDialogHandler.cxx:343: undefined reference to `SipDialogPublish::
SipDialogPublish(MRef<SipStack*>, MRef<SipIdentity*>, bool)'
collect2: ld returned 1 exit status

line 343 here:
cpp Syntax (Toggle Plain Text)
  1. MRef<SipDialogPublish*> pub(new SipDialogPublish(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN ));

Can someone help me about this error...Please explain to me what is this mean..and how can I solve this one. thanks in advance
Similar Threads
Reputation Points: 46
Solved Threads: 7
Junior Poster in Training
valtikz is offline Offline
51 posts
since Apr 2009
Jun 16th, 2009
0

Re: error while compiling...

Well, post your code first.
Last edited by s_sridhar; Jun 16th, 2009 at 2:55 am.
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009
Jun 16th, 2009
0

Re: error while compiling...

here is my code...
cpp Syntax (Toggle Plain Text)
  1. if (cmdstr.getOp() == SipCommandString::start_presence_client){
  2. cerr << "DefaultDialogHandler: Creating SipDialogPresenceClient for start_presence_client command"<< endl;
  3.  
  4. MRef<SipDialogPresenceClient*> pres(new SipDialogPresenceClient(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN ));
  5.  
  6. MRef<SipDialogPublish*> pub(new SipDialogPublish(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN )); //line 343
  7.  
  8. sipStack->addDialog( MRef<SipDialog*>(*pub) );
  9. sipStack->addDialog( MRef<SipDialog*>(*pres) );
  10.  
  11. CommandString command(cmdstr);
  12. cmdstr.setDestinationId(pres->getCallId());
  13. cmdstr.setDestinationId(pub->getCallId());
  14. SipSMCommand cmd( cmdstr, SipSMCommand::transaction_layer, SipSMCommand::dialog_layer);
  15. sipStack->enqueueCommand(cmd, HIGH_PRIO_QUEUE );
  16.  
  17. return true;
  18. }
Last edited by valtikz; Jun 16th, 2009 at 3:01 am.
Reputation Points: 46
Solved Threads: 7
Junior Poster in Training
valtikz is offline Offline
51 posts
since Apr 2009
Jun 16th, 2009
0

Re: error while compiling...

No a proper constructor of the class SipDialogPublish.
Check up class SipDialogPublish definition and types of constructor arguments in the line #343. Probably this constructor was declared but not defined yet...

Posted code is irrelevant.
Reputation Points: 1234
Solved Threads: 347
Postaholic
ArkM is offline Offline
2,001 posts
since Jul 2008
Jun 16th, 2009
0

Re: error while compiling...

thanks arkM, but what do you mean not defined? can I know how to define it?
this is my class SipDialogPublish:
cpp Syntax (Toggle Plain Text)
  1. SipDialogPublish::SipDialogPublish(MRef<SipStack*> stack,
  2. MRef<SipIdentity*> ident,
  3. bool use_stun) :
  4. SipDialog(stack,ident, ""),
  5. useSTUN(use_stun)
  6. {
  7. setUpStateMachine();
  8. }
Reputation Points: 46
Solved Threads: 7
Junior Poster in Training
valtikz is offline Offline
51 posts
since Apr 2009
Jun 16th, 2009
0

Re: error while compiling...

Click to Expand / Collapse  Quote originally posted by valtikz ...
thanks arkM, but what do you mean not defined?
Where is the method SipDialogPublish() defined in the class? You are calling it, so what is it supposed to do?

Click to Expand / Collapse  Quote originally posted by valtikz ...
can I know how to define it?
That depends on what it's supposed to do and what parameters are necessary to accomplish the task.

After all, it's your class definition, isn't it?
Moderator
Reputation Points: 3275
Solved Threads: 890
Posting Sage
WaltP is offline Offline
7,717 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: More Efficient way? Grabbing numbers
Next Thread in C++ Forum Timeline: Which Visual Studio 2008?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC