Thread: Compile pcap.h with dev-c++

  1. #1
    Registered User
    Join Date
    Jul 2005

    Question Compile pcap.h with dev-c++


    I am trying to create a sniffer program with libpcap on windows xp sp2. I am using Dev-C++ and I downloaded the winpcap 3.0 developer's pack. On site the winpcap, there is a documentation about the use with MS Visual C++, but I don't get to compile using the Dev-C++.

    There is a winpcap how-to using Dev-C++? Or what is the error in compiler log?

    #include <stdio.h>
    #include <stdlib.h>

    #include <pcap.h>

    main() {



    Compiler log:
    Compilador: Default compiler
    Executando gcc.exe...
    gcc.exe "D:\Progs\test3.c" -o "D:\Progs\test3.exe" -I"D:\Dev-Cpp\include" -L"D:\Dev-Cpp\lib"
    In file included from D:/Dev-Cpp/include/pcap-stdinc.h:32,
    from D:/Dev-Cpp/include/pcap.h:41,
    from D:\Progs\test3.c:4:
    D:/Dev-Cpp/include/bittypes.h:36: error: redefinition of typedef 'int8_t'
    D:/Dev-Cpp/include/stdint.h:27: error: previous declaration of 'int8_t' was here
    D:/Dev-Cpp/include/bittypes.h:52: error: redefinition of typedef 'int16_t'
    D:/Dev-Cpp/include/stdint.h:29: error: previous declaration of 'int16_t' was here
    D:/Dev-Cpp/include/bittypes.h:71: error: redefinition of typedef 'int32_t'
    D:/Dev-Cpp/include/stdint.h:31: error: previous declaration of 'int32_t' was here

    Execution finished.

    Thanks by help.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Well spamming the board won't help your cause -
    This is closed.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile as you type
    By Rocketmagnet in forum A Brief History of
    Replies: 33
    Last Post: 12-07-2006, 01:36 PM
  2. Dev C++ Won't Compile
    By mburt in forum Windows Programming
    Replies: 8
    Last Post: 08-21-2006, 11:14 PM
  3. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 09:05 PM
  4. Compile pcap.h with dev-c++?
    By hacinn in forum Networking/Device Communication
    Replies: 0
    Last Post: 08-01-2005, 06:27 AM
  5. Using OpenGL with Dev C++
    By Patrdm83 in forum C++ Programming
    Replies: 4
    Last Post: 02-04-2003, 05:57 PM