lxrt compiling-problem

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


Hi,

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

Martin


gcc-command:

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");
	perror(errno);
	exit(1);
	}
	
	task = rt_task_init(nam2num("myTask"),                        
priority,stack_size,msg_size);
	
	printf("Now is the LXRT Task runing\n");
	
	rt_task_delete(task);
	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
constant
/usr/realtime/include/rtai_lxrt.h:1113: error: (near initialization for
`arg')
/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
constant
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)
fwstimulator:~/prototyping/LXRT	

-- 
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