Re: rootcint problem (root-head version)

From: Diego Faso <faso_at_to.infn.it>
Date: Mon, 25 Sep 2006 16:16:14 +0200 (MET DST)


Thank you, I have applied this method in my code and now it is working. Cheers,
Diego

On Mon, 25 Sep 2006, Fons Rademakers wrote:

> Hi Diego,
>
> you will have to hide sys/socket.h from rootcint, by either not using any
> of its types in the class header file (only in the implementation) or by
> using simple typedef's or struct forwards like is for example done here:
> http://root.cern.ch/lxr/source/x11/inc/TGX11.h#29
>
> Cheers, Fons.
>
>
> Diego Faso wrote:
> > Hello, I have just downloaded thr root-head version (I'm testing the new
> > features of OpenGL), and I got some problems with the rootcint dictionary
> > generation. In particular I can not generate the dictionary if I try to
> > include the "sys/socket.h".
> > I attach a dummy class (header and source) as an example:
> >
> > I send the following command:
> > # rootcint -f dic.C -c -p TestClass.h Linkdef.h
> >
> > And I get the following error:
> >
> > Error: class,struct,union or type __socklen_t not defined
> > /usr/include/bits/socket.h:36:
> > Error: Symbol __uint32_t__ss_align is not defined in current scope
> > /usr/include/bits/socket.h:165:
> > Error: Symbol __uint32_t is not defined in current scope
> > /usr/include/bits/socket.h:166:
> > Warning: Error occurred during reading source files
> > Warning: Error occurred during dictionary source generation
> > !!!Removing dic.C dic.h !!!
> > Error: rootcint: error loading headers...
> >
> > Everything works fine with root-5.13/02.
> >
> > Do I have to modify anything in my code?
> > Thank you in advance.
> > Cheers
> > Diego
> >
> >
> > ------------------------------------------------------------------------
> >
> > //#include <sys/types.h>
> > #include <sys/socket.h>
> > //#include <netinet/in.h>
> >
> > #include "TObject.h"
> >
> > #include "Riostream.h"
> >
> > class TestClass: public TObject{
> >
> > private:
> > Int_t fTestNum;
> >
> > public:
> > TestClass();
> > ~TestClass();
> >
> > ClassDef(TestClass,1)
> > };
> >
> >
> > ------------------------------------------------------------------------
> >
> > #include "TestClass.h"
> >
> > ClassImp(TestClass)
> >
> > TestClass::TestClass(){
> >
> > }
> >
> > TestClass::~TestClass(){
> >
> > }
> >
> >
> > ------------------------------------------------------------------------
> >
> > #ifdef __CINT__
> >
> > #pragma link off all globals;
> > #pragma link off all classes;
> > #pragma link off all functions;
> >
> > #pragma link C++ class TestClass+;
> > #endif
>
> --
> Org: CERN, European Laboratory for Particle Physics.
> Mail: 1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers_at_cern.ch Phone: +41 22 7679248
> WWW: http://fons.rademakers.org Fax: +41 22 7669640
>
Received on Mon Sep 25 2006 - 16:16:24 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET