hi, i'm writing a portable x86 PC emulator in C. been working on it for about 7 or 8 months, and i've just added ethernet emulation using libpcap/winpcap.
on windows using MinGW (i use the Dev-C++ IDE in win) it works perfectly, but when i try to compile it on a linux box (Debian 6.0 "Squeeze") i get some errors. i've got libpcap and libpcap-dev installed. here is what happens when i try to compile, including the gcc command line i'm using:
Code:
mike@pentium4:~/mysrc/fake86# gcc adlib.c flags.c main.c ops.c ports.c video.c cpu.c grpops.c network.c packet.c render.c disk.c keyboard.c oplist.c parsecl.c speaker.c -o ./fake86-linux $(sdl-config --cflags --libs) $(pcap-config --cflags --libs)
packet.c: In function initpcap:
packet.c:44: error: PCAP_SRC_IF_STRING undeclared (first use in this function)
packet.c:44: error: (Each undeclared identifier is reported only once
packet.c:44: error: for each function it appears in.)
packet.c:92: error: PCAP_OPENFLAG_PROMISCUOUS undeclared (first use in this function)
i've googled quite a bit and can't find any pages that have been able to help, and there's nothing relevant in the pcap docs either.
any ideas? thanks...