- Compiling Error under linux (debian 2.4.20 kernel) with gcc-3.3
- Posted by Christoph Jossi on April 15th, 2004
Hi
I am trying to find out some stuff about netlink sockets. Therefore I
have written a small program:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/netlink.h>
main() {
struct sock *netlinkSocket = netlink_kernel_create(NETLINK_ROUTE, 0);
sock_release(netlinkSocket);
return 0;
}
I tried to compile it using: gcc-3.3 my_program.c
This gives me the following errors:
'netlink_kernel_create' undeclared (first use this function)
'sock_release' undeclared (first use this function)
This are two functions declared in netlink.h. Do I have to append some
tricky options?
Thanks for your help
Chris
- Posted by dtiktin on April 15th, 2004
On 15 Apr 2004, chjossi@gmx.ch (Christoph Jossi) wrote:
[snip]
[snip]
Look again. #ifdef __KERNEL__?
Dave
--
D.a.v.i.d T.i.k.t.i.n
t.i.k.t.i.n [at] a.d.v.a.n.c.e.d.r.e.l.a.y [dot] c.o.m
- [Update] Gnoppix 1.0.1 - A live Linux CD based on Debian GNU/Linux. (Software & Applications) by XemonerdX
- Gnoppix 0.8.2.2 - A live Linux CD based on Debian GNU/Linux. (Software & Applications) by Gordon Darling
- Gnoppix 0.8.1b7 - A live Linux CD based on Debian GNU/Linux. (Software & Applications) by Gordon Darling
- Gnoppix 0.8.1b4 - A live Linux CD based on Debian GNU/Linux. (Software & Applications) by Gordon Darling
- Debian GNU/Linux 3.0r2 - The Universal Operating System. (Software & Applications) by Gordon Darling

