Compile pcap.h with dev-c++

This is a discussion on Compile pcap.h with dev-c++ within the C Programming forums, part of the General Programming Boards category; Hi, I am trying to create a sniffer program with libpcap on windows xp sp2. I am using Dev-C++ 4.9.9.2 ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    12

    Question Compile pcap.h with dev-c++

    Hi,

    I am trying to create a sniffer program with libpcap on windows xp sp2. I am using Dev-C++ 4.9.9.2 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?


    [/Code]
    #include <stdio.h>
    #include <stdlib.h>

    #include <pcap.h>

    main() {

    printf("Test1");

    }
    [code]

    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    Well spamming the board won't help your cause - Compile pcap.h with dev-c++?
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile as you type
    By Rocketmagnet in forum A Brief History of Cprogramming.com
    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-22-2006, 12:14 AM
  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, 07:27 AM
  5. Using OpenGL with Dev C++
    By Patrdm83 in forum C++ Programming
    Replies: 4
    Last Post: 02-04-2003, 05:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21