Re: termios.h and rootcint

From: OKUMURA, Akira <oxon_at_icrr.u-tokyo.ac.jp>
Date: Mon, 4 Dec 2006 23:27:39 +0900


Hello Axel,

Thank you for your advice. It goes well with the following additional lines.

#ifdef __CINT__
// Eliminate rootcint errors

// Copied from <asm/termbits.h>

typedef unsigned char	cc_t;
typedef unsigned int	speed_t;
typedef unsigned int	tcflag_t;

#define NCCS 19
struct termios {

	tcflag_t c_iflag;		/* input mode flags */
	tcflag_t c_oflag;		/* output mode flags */
	tcflag_t c_cflag;		/* control mode flags */
	tcflag_t c_lflag;		/* local mode flags */
	cc_t c_line;			/* line discipline */
	cc_t c_cc[NCCS];		/* control characters */
};
#endif

Sincerely,

OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan Phone/Fax : +81 4-7136-3153
Skype : okumura.akira

On 2006/12/04, at 23:07, Axel Naumann wrote:

> Hi,
>
> make sure that CINT can parse the definition of speed_t, by either
> including the file containing the definition in ARS232C.h, or by
> adding
> the file containing the definition to the rootcint call, or by
> duplicating the definition in ARS232C.h, surrounding it with a
>
> #ifdef __CINT__
> typedef whatever speed_t;
> #endif
>
> Cheers, Axel.
>
> OKUMURA, Akira wrote:
>> Hello ROOTers,
>>
>> I wrote a class which includes termios.h to control RS232C
>> devices. When
>> I tried to generate dictionaries, some errors occurred.
>>
>> $ make
>> rootcint -f src/CloudMonitorDict.cxx -c -p include/ARS232C.h
>> include/LinkDef.h
>> Error: Symbol speed_tfInputSpeed is not defined in current scope
>> include/ARS232C.h:39:
>> Error: Symbol speed_tfOutputSpeed is not defined in current scope
>> include/ARS232C.h:40:
>> Syntax error include/ARS232C.h:59:
>> Syntax error include/ARS232C.h:60:
>> Syntax error include/ARS232C.h:61:
>> Warning: Error occurred during reading source files
>> Warning: Error occurred during dictionary source generation
>> ............
>>
>> fInputSpeed and fOutputSpeed are member variables of a class ARS232C.
>> lines 59, 60 and 61 have a strings "foo(speed_t speed)" where foo is
>> name of functions.
>>
>> like as below
>> ==================
>> class ARS232C : public TObject {
>> private:
>> speed_t fInputSpeed;
>> speed_t fOutputSpeed;
>> public:
>> ARS232C();
>> ~ARS232C();
>>
>> void func(speed_t speed);
>> };
>> ==================
>>
>> What should I do?
>>
>> Sincerely,
>>
>> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
>> Institute for Cosmic Ray Research, University of Tokyo
>> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
>> Phone/Fax : +81 4-7136-3153
>> Skype : okumura.akira
>>
>>
>
Received on Mon Dec 04 2006 - 15:28:01 MET

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