Re: [ROOT] ROOT 2.23.12: Accessing funct

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Mon Apr 10 2000 - 07:13:56 MEST


Hi Masaharu,

I had already tried the two namespace pragmas that you suggested (I
hinted at this in my original e-mail), and they don't work either.  So,
the problem/question remains - how do I import a function in a namespace
even though I am already using the two pragmas that you recommend?  I
have attached the two files that are necessary to run the following
command, which demonstrates the problem:

  $ rootcint -f cross_sectionDict.cxx -c cross_section.hxx LinkDef.h

Were you actually able to verify that you can run the above command
without problems?  It definitely does not work with ROOT 2.23.12 (which
corresponds to CINT 5.14.25).

Thank you for your help and expertise.


Masaharu Goto wrote:
> 
> Hello Philippe,
> 
> Yes, I noticed this. I forgot to mention following pragmas.
> 
> #pragma link C++ namespace MDL;
> #pragma link C++ namespace MDL::WAB;
> 
> For your information Cint handles namespace as a kind of struct which
> has only static member. So '#pragma link C++ class' and
> '#pragma link C++ namespace' are analogious.
> 
> Thank you
> Masaharu Goto

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU

// -*- c++ -*-
//
// Matthew D. Langston <langston@SLAC.Stanford.EDU>
// 1999-09-13

#ifndef MDL_CROSSSECTION_LINKDEF
#define MDL_CROSSSECTION_LINKDEF

#ifdef __MAKECINT__

#ifndef G__CROSSSECTION_DLL
#define G__CROSSSECTION_DLL
#endif

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;

#pragma link C++ global G__CROSSSECTION_DLL;

#pragma link C++ namespace MDL;
#pragma link C++ namespace MDL::WAB;
#pragma link C++ function cross_section;

#endif // __MAKECINT__

#endif // MDL_CROSSSECTION_LINKDEF


#ifndef MDL_WAB_CROSS_SECTION
#define MDL_WAB_CROSS_SECTION


namespace MDL
{
   namespace WAB
   {
      double cross_section( double* variables, double* parameters );
   }
}


#endif // MDL_WAB_CROSS_SECTION



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:23 MET