rtai_sched.h parse error

Russell rjshaw at iprimus.com.au
Sat Nov 2 09:02:20 CET 2002


Russell wrote:
> 
> Hi all,
> 
> I'm using latest rtai4 from cvs. I can't see why i get errors like this:
>   /home/russell/rtai4/include/rtai_sched.h:110: parse error before `RTIME'
>   /home/russell/rtai4/include/rtai_sched.h:110: warning: no semicolon at end of struct or union
> 
> I've got in my code: #include<rtai_sched.h>
> I'm using LXRT, so my code is 'user space'...

Oops, i forgot <rtai.h>. When i use:

#include<rtai.h>
#include<rtai_sched.h>

I get different errors:

In file included from ../serial/../que/que.h:14,
                 from ../serial/serial.h:6,
                 from main.c:7:
/home/russell/rtai4/include/rtai_sched.h:124: parse error before `FPU_ENV'
/home/russell/rtai4/include/rtai_sched.h:124: warning: no semicolon at end of struct or union
/home/russell/rtai4/include/rtai_sched.h:165: parse error before `}'
/home/russell/rtai4/include/rtai_sched.h:165: warning: empty declaration
/home/russell/rtai4/include/rtai_sched.h:175: parse error before `spinlock_t'
/home/russell/rtai4/include/rtai_sched.h:175: warning: no semicolon at end of struct or union

However, i get rid of all those errors if
i use only:
  #include <rtai_lxrt_user.h>

But now when i link all the object .o files together,
i get lots of linker errors about duplicates:

serial.o: In function `nam2num':
serial.o(.text+0x0): multiple definition of `nam2num'
hardware.o(.text+0x0): first defined here
serial.o: In function `num2nam':
serial.o(.text+0xcc): multiple definition of `num2nam'
hardware.o(.text+0xcc): first defined here
serial.o: In function `my_cs':
serial.o(.text+0x228): multiple definition of `my_cs'
hardware.o(.text+0x228): first defined here
serial.o: In function `memxcpy':
serial.o(.text+0x244): multiple definition of `memxcpy'
hardware.o(.text+0x244): first defined here
serial.o: In function `_memxcpy':
serial.o(.text+0x26c): multiple definition of `_memxcpy'
hardware.o(.text+0x26c): first defined here
serial.o: In function `rtai_lxrt':
serial.o(.text+0x28c): multiple definition of `rtai_lxrt'
hardware.o(.text+0x28c): first defined here
serial.o: In function `rt_get_adr':
serial.o(.text+0x324): multiple definition of `rt_get_adr'
hardware.o(.text+0x324): first defined here
serial.o: In function `rt_get_name':
serial.o(.text+0x358): multiple definition of `rt_get_name'
hardware.o(.text+0x358): first defined here
serial.o: In function `rt_task_init_schmod':
serial.o(.text+0x38c): multiple definition of `rt_task_init_schmod'
hardware.o(.text+0x38c): first defined here
serial.o: In function `rt_task_init':
serial.o(.text+0x430): multiple definition of `rt_task_init'
hardware.o(.text+0x430): first defined here
serial.o: In function `rt_set_sched_policy':
serial.o(.text+0x490): multiple definition of `rt_set_sched_policy'
hardware.o(.text+0x490): first defined here
serial.o: In function `rt_change_prio':
serial.o(.text+0x4d8): multiple definition of `rt_change_prio'




More information about the Rtai mailing list