我正在尝试编译此处提供的示例C代码http://www.bani.com.br/lang/en/2012/05/programmatically-managing-iptables-rules-in-c-iptc/
使用(如帖子所述):
cc `pkg-config –cflags –libs libiptc` iptablesExample_2.c -o iptablesExample_2
我也尝试使用以下方法编译它:
sudo gcc -g -o iptablesExample_2 iptablesExample_2.c -liptc -liptables -ldl
它也不起作用,这次的错误是:
/usr/bin/ld: cannot find -liptables
collect2: ld returned 1 exit status
我也尝试过本文末尾提供的示例 http://wiki.tldp.org/iptc%20library%20HOWTO 我有同样的问题
Linux内核:3.8.2 iptables版本:v1.4.12