Re: rootcint problem (root-head version)

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Mon, 25 Sep 2006 15:24:55 +0200


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 - 15:24:55 MEST

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