Dear all,
I am a newbie of RTLinux. Now, I am just working on
is upgrading a program from RTLinux 2.0 to RTLinux 3.0. This program works fine
under RedHat 6.1 + RTLinux 2.0, now, my work is to upgrade it to RedHat 7.0 +
RTLinux 3.0
My problems are:
1. As the UPGRADING file said, RTLinux components have been separated from the Linux kernel, so to build our programs, we just need to use the rtl.mk file under /usr/src/rtlinux or /usr/rtlinux-3.0. So I modified the makefile to include this file. my makefile is like:
include /usr/rtlinux-3.0/rtl.mk
FLAG=-Wall -fno-exceptions -fno-rtti -D__RTL__
-D__KERNEL__ -DMODULE
all: example.o
example.o: _example.o
ld -r -o example.o _example.o -L../../../lib -lMultiQ _example.o: example.cpp
g++ -o _example.o $(INCLUDE) $(FLAG) -c example.cpp clean:
rm -f _example.o rm -f example.o But when I compile my program, it will give me
hundreds of errors. There are 2 most common kinds of errors:
1)
/usr/src/rtlinux/linux/include/asm/rtlinux_cli.h:24:13: warning: junk on line after #undef /usr/src/rtlinux/linux/include/asm/rtlinux_cli.h:25:13: warning: junk on line after #undef /usr/src/rtlinux/linux/include/asm/rtlinux_cli.h:26:20: warning: junk on line after #undef /usr/src/rtlinux/linux/include/asm/rtlinux_cli.h:27:23: warning: junk on line after #undef /usr/src/rtlinux/linux/include/asm/rtlinux_cli.h:33:17: warning: junk on line after #undef In file included from /usr/include/time.h:57, from /usr/src/rtlinux/include/rtl_sched.h:25, from example.cpp:21: I check the rtlinux_cli.h, can not find anything
wrong with it.
2)
In file included from /usr/include/time.h:57, from /usr/src/rtlinux/include/rtl_sched.h:25, from example.cpp:21: /usr/include/bits/types.h:104:25: warning: "__NFDBITS" redefined /usr/src/rtlinux/linux/include/linux/posix_types.h:22:1: warning: this is the location of the previous definition /usr/include/bits/types.h:106:17: warning: "__FDMASK" redefined /usr/src/rtlinux/linux/include/linux/posix_types.h:34:1: warning: this is the location of the previous definition I check both of the files and found that they are
really redefined. I do not know why my compiler will give me this
warning.
I know my questions looks too strange, that's why I
have to ask for help. I hope I can get some help from you.
Best wishes
Hai Xu |