Windows 指向结构的Qt指针

Windows 指向结构的Qt指针,windows,pointers,structure,libpcap,Windows,Pointers,Structure,Libpcap,我使用QtCreator(5.13),我尝试使用libpcap创建一些应用程序。当我在类中使用(struct ethhdr*eth)创建某个方法时,我会得到一个错误: 代码: 错误: 对不完整类型“struct ethhdr*eth”的成员访问 顺便说一句,我使用c++99如果你使用Windows,你应该使用,这里有一些标题 ether.h,ip.h,udp.h和tcp.h 此外,我还尝试使用ethhdr,但这是错误的,显然这是针对Linux的结构 将其用于Windows: /* * Struc

我使用QtCreator(5.13),我尝试使用
libpcap
创建一些应用程序。当我在类中使用(struct ethhdr*eth)创建某个方法时,我会得到一个错误:

代码:

错误: 对不完整类型“struct ethhdr*eth”的成员访问


顺便说一句,我使用c++99

如果你使用Windows,你应该使用,这里有一些标题

ether.h
ip.h
udp.h
tcp.h

此外,我还尝试使用
ethhdr
,但这是错误的,显然这是针对Linux的结构

将其用于Windows:

/*
* Structure of an Ethernet header.
*/
struct  ether_header {
    uint8_t     ether_dhost[ETHER_ADDR_LEN];
    uint8_t     ether_shost[ETHER_ADDR_LEN];
    uint16_t    ether_length_type;
};

`INCLUDEPATH+=C:/WpdPack/Include LIBS+=-LC:/WpdPack/Lib LIBS+=-lwpcap`和header:#Include我实现了,我看看Linux的示例,这个结构在
中。但我需要在Windows中使用相同的标题。它是什么文件?“我使用c++99”-c++99不是一种语言。有C++98和C99(以及其他)。
/*
* Structure of an Ethernet header.
*/
struct  ether_header {
    uint8_t     ether_dhost[ETHER_ADDR_LEN];
    uint8_t     ether_shost[ETHER_ADDR_LEN];
    uint16_t    ether_length_type;
};