I'm making a project that requires libpcap library, I downloaded the library from official website (libpcap-1.7.2.tar.gz) and I want to compile and the project on Unix server, but I am not allowed to install the library there (school server) and I cannot run the gcc as root.
What command shall I use? Or is it even possible? I can't find any info. (.. my aim is to run the binary on another linux OS (with root permissions) without the need of installing the lib.)
I already tried:
gcc -Wall test.c -lpcap -Ilib/libpcap-1.7.2
but getting an error:
lib/libpcap-1.7.2/pcap.h:43:23: fatal error: pcap/pcap.h: No such file or directory
#include <pcap/pcap.h>
^