0

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>
                       ^
Marek Teuchner
  • 327
  • 1
  • 4
  • 15
  • What did you do with libpcap-1.7.2.tar.gz *after* downloading it? Presumably you ran the configure script and compiled it; did you install it after that? –  Apr 15 '15 at 09:04
  • I just downloaded it, so there is no way to compile this without an installation, right. btw, is it possible to launch such compiled binary on another linux os, where this library does not exist? – Marek Teuchner Apr 15 '15 at 09:10
  • You'll have to compile the libpcap source. Are both Linux machines (the one on which you're compiling your program and the one on which you'll be running the program) running the same version of the Linux kernel? Do they have the same type of processor (32-bit x86, x86-64, 32-bit PowerPC, 64-bit PowerPC, 32-bit ARM, 64-bit ARM, etc.)? –  Apr 15 '15 at 16:36

0 Answers0