lxrt compiling-problem

martin.my at gmx.de martin.my at gmx.de
Fri Oct 22 08:59:42 CEST 2004


this my first test with lxrt, an i have so problems i have whriten a test
programm and when i compile the programm i get hundreds of fail.

an rtai.dk i have read i must put #include <sys/types>, but the achievement
was the same.

Has someone a bugfix for me, thanks



gcc -o lxrt_test1.o lxrt_test1.c -l/usr/realtime/lib/liblxrt.a
the test code:

#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
//#include "/usr/realtime/include/rtai_lxrt_user.h>
#include "/usr/realtime/include/rtai_lxrt.h"

int main(void)
	RT_TASK* task;
	int priority=0;
	int stack_size=0;
	int msg_size=0;

	struct sched_param mysched;
	mysched.sched_priority=sched_get_priority_max(SCHED_FIFO) -1;
	if(sched_setscheduler(0,SCHED_FIFO, &mysched) == -1 )
	printf("Error in setting the Scheduler\n");
	task = rt_task_init(nam2num("myTask"),                        
	printf("Now is the LXRT Task runing\n");
	return 0;
a partial of the fail's
/usr/realtime/include/rtai_lxrt.h:1106: error: `arg' previously defined here
/usr/realtime/include/rtai_lxrt.h:1113: error: `time_orig' undeclared here
(not in a function)
/usr/realtime/include/rtai_lxrt.h:1113: error: initializer element is not
/usr/realtime/include/rtai_lxrt.h:1113: error: (near initialization for
/usr/realtime/include/rtai_lxrt.h:1113: warning: data definition has no type
or storage class
/usr/realtime/include/rtai_lxrt.h:1114: error: parse error before numeric
lxrt_test1.c: In function `main':
lxrt_test1.c:10: error: `RT_TASK' undeclared (first use in this function)
lxrt_test1.c:10: error: (Each undeclared identifier is reported only once
lxrt_test1.c:10: error: for each function it appears in.)
lxrt_test1.c:10: error: `task' undeclared (first use in this function)
lxrt_test1.c:22: error: `errno' undeclared (first use in this function)

Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
++++ Jetzt anmelden und testen http://www.gmx.net/de/go/mail ++++

More information about the Rtai mailing list