Compilation issue with libnl
Helmut Schaa
hschaa at suse.de
Mon May 14 15:00:32 CEST 2007
Hi Thomas,
KNetworkManager now uses libnl for getting network statistics but some people
got compilation issues due to the libnl inclusion. I was able to track the
problem down on an Ubuntu system (libnl 1.0-pre6) and it appears that its
enough to include "netlink/netlink.h" in an empty sourcefile and compilation
reports a lot of errors like "error: __u32 does not name a type".
I attached a sourcefile which produces a long list of errors when compiled
using the following command:
g++ `pkg-config --libs --cflags libnl-1` main.cc
You can work around the problem by including "linux/types.h"
before "netlink/netlink.h". This workaround was also discussed on the
KNetworkManager list but I do not like the idea of including kernel headers
in KNM, right?
So is it really necessary to have all the *-kernel includes
in "netlink/netlink.h" (like "netlink-kernel.h")?
And can you give some hints how to prevent compilation problems like the one
mentioned above?
Thanks,
Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cc
Type: text/x-c++src
Size: 98 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-networkmanager/attachments/20070514/669ef301/attachment.bin
More information about the kde-networkmanager
mailing list