Hi, I have a libipq program that compiles perfectly with this
gcc -g -Wall -Wunused -DNETFILTER_VERSION=\"1.2.7\" -rdynamic -o test test.c /usr/local/lib/iptables.o /usr/local/lib/libiptc.a -ldl -lipq
and I wanted to put multithreading features on it and in my system I run pthread programs as
gcc -D_POSIX_C_SOURCE=199056 -D_REENTRANT -ansi -lpthread -o test_thread test_thread.c
so I put some pthread functionality in my original pthread program and tried to compile with the following
gcc -g -Wall -Wunused -DNETFILTER_VERSION=\"1.2.7\" -D_POSIX_C_SOURCE=199056 -D_REENTRANT -ansi -rdynamic -o test test.c /usr/local/lib/iptables.o /usr/local/lib/libiptc.a -ldl -lipq -lpthread
but this time I get the error:
>In file included from /usr/local/include/libipq.h:37
>from test.c: 2:
>/usr/include/linux/netfilter_ipv4/ip_queue.h:27: 'IFNAMSIZ' undeclared here (not a function)
>/usr/include/linux/netfilter_ipv4/ip_queue.h:28: 'IFNAMSIZ' undeclared here (not a function)
>/usr/include/linux/netfilter_ipv4/ip_queue.h:35: confused by earlier errors, bailing out
I think the problem is with some order of library binding, but I couldn't figure it (I tried to link one library before the other and the like).
What is wrong?