0

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:

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 :)

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by WaltP
0

here is my code...

if (cmdstr.getOp() == SipCommandString::start_presence_client){
		cerr << "DefaultDialogHandler: Creating SipDialogPresenceClient for start_presence_client command"<< endl;

		MRef<SipDialogPresenceClient*> pres(new SipDialogPresenceClient(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN ));

		MRef<SipDialogPublish*> pub(new SipDialogPublish(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN )); //line 343

		sipStack->addDialog( MRef<SipDialog*>(*pub) );
		sipStack->addDialog( MRef<SipDialog*>(*pres) );
		
		CommandString command(cmdstr);
		cmdstr.setDestinationId(pres->getCallId());
		cmdstr.setDestinationId(pub->getCallId());		
		SipSMCommand cmd( cmdstr, SipSMCommand::transaction_layer, SipSMCommand::dialog_layer);
		sipStack->enqueueCommand(cmd, HIGH_PRIO_QUEUE );

		return true;
	}
0

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.

0

thanks arkM, but what do you mean not defined? can I know how to define it?
this is my class SipDialogPublish:

SipDialogPublish::SipDialogPublish(MRef<SipStack*> stack, 
		MRef<SipIdentity*> ident,
		bool use_stun) : 
                	SipDialog(stack,ident, ""),
			useSTUN(use_stun)
{
	setUpStateMachine();
}
0

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?

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.