RE: [ROOT] Error in <TQObject::CheckConnectArgs> slot ... does no t exist

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed Feb 20 2002 - 19:12:00 MET


Hi Tony,

  you only need to make a dictionary for DvatCanvas. No need to process
all other headers. If DvatCanvas contains object of third party
libraries you can add an #ifdef __CINT__ to forward declare them for
CINT (works only for incomplete types like pointers and references).
As example see:
http://root.cern.ch/lxr/source/x11/inc/TGX11.h

If more problems let me know offline from roottalk.

Cheers, Fons.



On Wed, 2002-02-20 at 18:47, Colley, Tony wrote:
> Fons,
> 
> DvatCanvas is compiled... I am not trying to do this from the ROOT
> interpreter, but from an application which links to the ROOT libraries.
> 
> I didn't know what a "dictionary" was [in the ROOT context], so I went
> searching again on the ROOT website. I don't know how much of my code I need
> to put into this dictionary, but I thought I'd start with just the
> DvatCanvas class. So I eventually tried the following:
> 
> [12:36:49 dvat] rootcint -f DvatDict.cpp -c -I. -Itoolbox/attr
> -Itoolbox/containers -Itoolbox/dvat -Itoolbox/generalsourcemodel
> -Itoolbox/ittlib -Itoolbox/flexclasses/baseclasses
> -Itoolbox/flexclasses/calibration -Itoolbox/flexclasses/compression
> -Itoolbox/flexclasses/electronics -Itoolbox/flexclasses/generalalgorithms
> -Itoolbox/flexclasses/imagebuilder -Itoolbox/flexclasses/mtf
> -Itoolbox/flexclasses/nedt -Itoolbox/flexclasses/optresp
> -Itoolbox/flexclasses/reader -Itoolbox/flexclasses/scanner
> -Itoolbox/flexclasses/sim -Itoolbox/flexclasses/util
> -Itoolbox/flexclasses/viirs -I../include -I$ROOTSRC/include
> -I$ITOOLS/cpputil -I$ITOOLS/ipcc -I$ITOOLS/sim -I$ICSF/omecore/ome
> -I$ICSF/omesim/simserver -I$ICSF/dvat_ext -I$QTDIR/include
> -I/devel/qt/mkspecs/default DvatCanvas.h
> 
> And the response I got was:
> 
> Limitation: can not handle macro UTIL util Use +P or -p option
>  FILE:/devel/iTools/cpputil/util_config.h LINE:47
> Limitation: can not handle macro USING_UTIL_NAMESPACE usingnamespaceutil;
> Use +P or -p option
>  FILE:/devel/iTools/cpputil/util_config.h LINE:48
> Limitation: can not handle macro BEGIN_UTIL_NAMESPACE
> namespaceutil{namespaceutil{} Use +P or -p option
>  FILE:/devel/iTools/cpputil/util_config.h LINE:64
> Error: Symbol BEGIN_UTIL_NAMESPACEclassCPPUTIL_DECLSPECDelTime is not
> defined in current scope  FILE:/devel/iTools/cpputil/utilfwd.h LINE:28
> Error: class,struct,union or type Units not defined  FILE:prec_stl/map
> LINE:41
> Error: Symbol second is not defined in current scope  FILE:prec_stl/utility
> LINE:12
> Error: operator* not defined for CPPUTIL_DECLSPEC FILE:prec_stl/utility
> LINE:12
> Warning: Unknown type 'Units' in function argument handled as int
> FILE:prec_stl/utility LINE:14
> Error: Unexpected EOF G__fgetspace():2 FILE:/devel/iTools/cpputil/utilfwd.h
> LINE:92
> Advice: You may need to use +P or -p option
> Report: Unrecognized string 'END_UTIL_NAMESPACE' ignored
> FILE:/devel/iTools/cpputil/utilfwd.h LINE:93
> Error: class,struct,union or type public std not defined
> FILE:/devel/iTools/cpputil/cstring.h LINE:33
> Error: no such template basic_string<char>
> FILE:/devel/iTools/cpputil/cstring.h LINE:36
> Error: Unexpected EOF G__fgetspace():2 FILE:/devel/iTools/cpputil/cstring.h
> LINE:103
> Advice: You may need to use +P or -p option
> Report: Unrecognized string 'END_UTIL_NAMESPACE' ignored
> FILE:/devel/iTools/cpputil/cstring.h LINE:104
> Error: class,struct,union or type util not defined  FILE:DvatCanvas.h
> LINE:57
> Error: class,struct,union or type util not defined  FILE:DvatCanvas.h
> LINE:57
> Error: class,struct,union or type util not defined  FILE:DvatCanvas.h
> LINE:78
> Error: class,struct,union or type util not defined  FILE:DvatCanvas.h
> LINE:78
> Warning: Error occured during reading source files
> Warning: Error occured during dictionary source generation
> !!!Removing DvatDict.cpp DvatDict.h !!!
> rootcint: error loading headers...
> 
> -------------------------
> 
> So what does all that mean?
> 
> What are the "+P" and "-p" options? "rootcint -?" or "rootcint -h" doesn't
> mention any such options.
> 
> I don't have to put all this third-party software into the dictionary, do I?
> I have no control over the files under the /devel/iTools directory; and I
> can't be messing around in their makefiles.
> 
> Am I just plain out of luck?
> 
> Cheers,
> Tony
> 
> 
> -----Original Message-----
> From: Fons Rademakers [mailto:Fons.Rademakers@cern.ch]
> Sent: Wednesday, February 20, 2002 11:58
> To: Colley, Tony
> Cc: 'roottalk@pcroot.cern.ch'
> Subject: RE: [ROOT] Error in <TQObject::CheckConnectArgs> slot ... does
> no t exist
> 
> 
> Is DvatCanvas compiled or interpreted? If compiled you have to make a
> dictionary otherwise it cannot find monitorClose. If you make a
> dictionary, please make me a little example I can test.
> 
> Cheers, Fons.
> 
> 
> 
> On Wed, 2002-02-20 at 17:50, Colley, Tony wrote:
> > Fons,
> > 
> > 3.03/00... I updated from CVS on Monday (18 Feb) at 1:55 EST.
> > 
> > Tony
> > 
> > -----Original Message-----
> > From: Fons Rademakers [mailto:Fons.Rademakers@cern.ch]
> > Sent: Wednesday, February 20, 2002 11:48
> > To: Colley, Tony
> > Cc: 'roottalk@pcroot.cern.ch'
> > Subject: RE: [ROOT] Error in <TQObject::CheckConnectArgs> slot ... does
> > no t exist
> > 
> > 
> > Which version of ROOT are you using?
> > 
> > 
> > Cheers, Fons.
> > 
> > 
> > On Wed, 2002-02-20 at 17:38, Colley, Tony wrote:
> > > Fons,
> > > 
> > > Thanks for the quick response.
> > > 
> > > I made the change you suggested but I still get the same error message
> and
> > > monitorClose() is never called. (I added an output statement to make
> sure
> > I
> > > was calling the new version of the code... the new output message
> appears,
> > > but so does the old error message.)
> > > 
> > > Any other suggestions?
> > > 
> > > Cheers,
> > > Tony
> > > 
> > > 
> > > -----Original Message-----
> > > From: Fons Rademakers [mailto:Fons.Rademakers@cern.ch]
> > > Sent: Wednesday, February 20, 2002 11:29
> > > To: Colley, Tony
> > > Cc: 'roottalk@pcroot.cern.ch'
> > > Subject: Re: [ROOT] Error in <TQObject::CheckConnectArgs> slot ... does
> > > not exist
> > > 
> > > 
> > > Hi Tony,
> > > 
> > > try:
> > >    rc->Connect("CloseWindow()", "DvatCanvas", this, "monitorClose()");
> > > 
> > > this way you tell the system to use the DvatCanvas::monitorClose() slot
> > > for "this" instance of DvatCanvas.
> > > 
> > > Cheers, Fons.
> > > 
> > > 
> > > 
> > > On Wed, 2002-02-20 at 17:13, Colley, Tony wrote:
> > > [edited to relieve strain on mail servers around the world]
> > > > 
> > > >    TRootCanvas *rc = (TRootCanvas*)m_canvas->GetCanvasImp();
> > > >    rc->Connect("CloseWindow()", 0, 0, "monitorClose()");
> > > > 
> > > >    return;
> > > > }
> > > > 
> > > > // FUNCTION TO MONITOR CLOSING OF CANVAS
> > > > void DvatCanvas::monitorClose()
> > > > {
> > > >    cout << "DvatCanvas::monitorClose" << endl;
> > > > }
> > > > 
> > > > -------- END OF CODE EXCERPTS --------------
> > > [edited more]
> > > > 
> > > > Anyway, everything works fine... the canvas is created, stuff is drawn
> > on
> > > > it, the user can interact normally with the canvas and its objects...
> > > except
> > > > when I call Connect() I get the message:
> > > > 
> > > >   Error in <TQObject::CheckConnectArgs> slot monitorClose does not
> exist
> > > > 
> > > > And, of course, monitorClose() is not called when the user closes the
> > > > canvas.
> > > > 
> > > > I tried specifying "DvatCanvas::monitorClose()" in the Connect call,
> but
> > > > that didn't make any difference.
> > > > 
> > > > Help!
> > > > 
> > > > Tony Colley
> > > > ITT Industries A/CD
> > > > Fort Wayne, IN  USA
> > > > Tony.Colley@itt.com
> > > -- 
> 
> ************************************ 
> If this email is not intended for you, or you are not responsible for the
> delivery of this message to the addressee, please note that this message may
> contain ITT Privileged/Proprietary Information.  In such a case, you may not
> copy or deliver this message to anyone.  You should destroy this message and
> kindly notify the sender by reply email.  Information contained in this
> message that does not relate to the business of ITT is neither endorsed by
> nor attributable to ITT. 
> ************************************ 
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:42 MET