From: Cliff Rosson Date: 2012-01-20T15:14:08+09:00 Subject: Re: Installing PCAP Thanks Jon. I actually did have the wincap libraries and headers installed. I tried using the "--with-pcap-includedir" argument. You are right that pcap is fairly old. I tried pcaprub and also and ran into issues. I have the wincap lib and headers in C:\WpdPack. That is exactly where extconf.rb is looking. ~~~~~~~ pcap_dir = with_config("pcap-dir", "C:/WpdPack") pcap_includedir = with_config("pcap-includedir", pcap_dir + "/include") pcap_libdir = with_config("pcap-libdir", pcap_dir + "/lib") have_library("wpcap", "pcap_open_live") have_library("wpcap", "pcap_setnonblock") elsif /i386-mswin32/ =~ RUBY_PLATFORM pcap_dir = with_config("pcap-dir", "C:\\WpdPack") pcap_includedir = with_config("pcap-includedir", pcap_dir + "\\include") pcap_libdir = with_config("pcap-libdir", pcap_dir + "\\lib") $CFLAGS = "-DWIN32 -I#{pcap_includedir}" $LDFLAGS = "/link /LIBPATH:#{pcap_libdir}" have_library("wpcap", "pcap_open_live") have_library("wpcap", "pcap_setnonblock") else ~~~~~~~ WheN I try to gem install pcaprub I still get.... C:\Users\user>gem install pcaprub Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing pcaprub: ERROR: Failed to build gem native extension. C:/Ruby192/bin/ruby.exe extconf.rb [*] Running checks for pcaprub code... platform is i386-mingw32 checking for main() in -lws2_32... yes checking for main() in -liphlpapi... yes checking for windows.h... yes checking for winsock2.h... yes checking for iphlpapi.h... yes checking for pcap_open_live() in -lwpcap... no checking for pcap_setnonblock() in -lwpcap... no creating Makefile make gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1 .9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_W INSOCK2_H -DHAVE_IPHLPAPI_H -O3 -g -Wextra -Wno-unused-parameter -Wno-parenth eses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-l ong -o pcaprub.o -c pcaprub.c pcaprub.c:8:18: fatal error: pcap.h: No such file or directory compilation terminated. make: *** [pcaprub.o] Error 1 Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/pcaprub-0 .11.2 for inspection. Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/pcaprub-0.11.2/ext/pcaprub /gem_make.out C:\Users\user> -- Posted via http://www.ruby-forum.com/.