Dear,
I am a very beginner in RTnet and linux, so I want to ask a simple question. I
am using xenomai-2.5.4 and rtnet-0.9.12 in linux-2.6.32.11. I want to use the
example program. that is raw-packets.c to send packet to another computer that
use rtnet too. So, I use gcc to compile the raw-packets.c, and get error. I am
confused how to get it compiled and to create the raw-packets program.
Thanks
==========
The command that I use
gcc -lnative -lrtdk -I /usr/xenomai/include/ -I /usr/local/rtnet/include/ -I
/usr/xenomai/include/native/ -I /usr/src/rtnet-0.9.12/stack/include/ -I
/usr/xenomai/include/nucleus/ -D _GNU_SOURCE -D_REENTRANT -Wall -pipe -D
__XENO__ -L /usr/xenomai/lib/ -lxenomai -lpthread -lnative -lrtdk
/home/mon/Desktop/raw-packets.c -o /home/mon/Desktop/raw-packets
==> I add -I /usr/src/rtnet-0.9.12/stack/include because the rtnet_config.h is
only there while I use locate command>
==> it still get error that the "linux/module.h" in the include section is not
found, but while I locate the "linux/module.h" that is told in the error "no
such
file or directory" and add the located file (maybe
usr/src/linux-2.6.32.11/include/) to the gcc command, it get more (a lot
of) errors.
========
the error that I got while using the command above
/home/mon/Desktop/raw-packets.c:25:26: error: linux/module.h: No such
file or
directory
/home/mon/Desktop/raw-packets.c:38:41: error: missing
binary operator before token "("
/home/mon/Desktop/raw-packets.c:41:
error: expected ‘)’ before string constant
/home/mon/Desktop/raw-packets.c:43:
error: expected ‘)’ before ‘int’
/home/mon/Desktop/raw-packets.c:44:
error: expected ‘)’ before string constant
/home/mon/Desktop/raw-packets.c:45:
error: expected ‘)’ before string constant
/home/mon/Desktop/raw-packets.c:47:
error: expected declaration specifiers or ‘...’ before string constant
/home/mon/Desktop/raw-packets.c:47:
warning: data definition has no type or storage class
/home/mon/Desktop/raw-packets.c:47:
warning: type defaults to ‘int’ in declaration of ‘MODULE_LICENSE’
/home/mon/Desktop/raw-packets.c:
In function ‘send_msg’:
/home/mon/Desktop/raw-packets.c:81: warning:
implicit declaration of function ‘printk’
/home/mon/Desktop/raw-packets.c:
In function
‘init_module’:
/home/mon/Desktop/raw-packets.c:139: warning:
implicit declaration of function ‘htons’
/home/mon/Desktop/raw-packets.c:143:
warning: implicit declaration of function ‘rt_eth_aton’
/home/mon/Desktop/raw-packets.c:
In function ‘cleanup_module’:
/home/mon/Desktop/raw-packets.c:233:
warning: implicit declaration of function ‘set_current_state’
/home/mon/Desktop/raw-packets.c:233:
error: ‘TASK_UNINTERRUPTIBLE’ undeclared (first use in this function)
/home/mon/Desktop/raw-packets.c:233:
error: (Each undeclared identifier is reported only once
/home/mon/Desktop/raw-packets.c:233:
error: for each function it appears in.)
/home/mon/Desktop/raw-packets.c:234:
warning: implicit declaration of function ‘schedule_timeout’
==========
is there any step that I miss while compiling this? like add the library path
or get the include file?
If so, please tell me the exact command/step to make this example program can
run, because I am very newbie in this things.
thanks a lot
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
RTnet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-users