current position:Home>Using C + + and pcap H and iphlpapi H. how to solve the problem?

Using C + + and pcap H and iphlpapi H. how to solve the problem?

2022-02-02 23:25:19 CSDN Q & A

The environment is VC++6.0,winpcap, It has been configured , I'm going to make a arp Package sending tool , In the use of Windows API When obtaining network card information , There is a problem with the compilation :
#ifndef WIN32_LEAN_AND_MEAN[]()#define WIN32_LEAN_AND_MEAN#endif#include <stdio.h>#include <stdlib.h>#include "pcap.h"#include <string.h>#include <WinSock2.h>#include <Iphlpapi.h>// An error occurred while adding this header file #include <iostream>#pragma comment(lib,"Iphlpapi.lib") // Need to add Iphlpapi.lib library using namespace std;// The following code is omitted ...
The following error occurred during compilation :

c:\program files (x86)\microsoft visual studio\vc98\include\ipexport.h(39) : error C2371: 'IN6_ADDR' : redefinition; different basic types c:\program files (x86)\microsoft visual studio\vc98\include\ws2tcpip.h(68) : see declaration of 'IN6_ADDR'

Excuse me , How can I solve this problem ?
I hope you can help me ~

Refer to the answer 1:

Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.

Random recommended