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

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;
	}

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.

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();
}

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?