<div>Please help me!</div> <div>I'm using VisualC++ 6.0<BR>I created a class which is inherited from vtkCommand<BR>//--------------------------------------------------<BR>class ExCallback : public vtkCommand<BR>{<BR>public:<BR> static ExCallback *New()<BR> { return ::new ExCallback; }</div> <div> virtual void Execute(vtkObject *caller, unsigned long, void*)<BR> {<BR> vtkRenderWindowInteractor *interactor = reinterpret_cast<vtkRenderWindowInteractor *>(caller);<BR> int X = interactor->GetEventPosition()[0];<BR> int Y = interactor->GetEventPosition()[1];</div> <div>
interactor->GetPicker()->Pick(X,Y,0.0,aRenderer);<BR> }<BR>private:<BR> ExCallback(): Renderer(0) {}<BR>public:<BR> vtkRenderer *Renderer;<BR>};</div> <div>//-----------------------------------</div> <div>Then compiled ===> No ERROR occurs</div> <div>But when it was used in a function :</div> <div>void myFunc()<BR>{<BR> ....................................<BR> ExCallback *myCallback = ExCallback::New();<BR> //error occurs when compiling this sentence</div> <div> myCallback->Renderer = Renderer;<BR> <BR> ................................<BR>}<BR>2 errors occur :<BR>error LNK2001: unresolved external symbol "public: virtual char const * __thiscall vtkObjectBase::GetClassNameW(void)const " (<A href="mailto:?GetClassNameW@vtkObjectBase@@UBEPBDXZ">?GetClassNameW@vtkObjectBase@@UBEPBDXZ</A>)</div>
<div>fatal error LNK1120: 1 unresolved externals</div> <div> </div> <div>My email address : <A href="mailto:pinoxio_kt@yahoo.com">pinoxio_kt@yahoo.com</A></div> <div>Thank you !</div> <div><BR> </div><p> 
                <hr size=1>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com"> Great rates starting at 1¢/min.