Hi all,
When I tried to build my test code,it prompts this error: undefined reference to GetAdaptersInfo@8 although I've included iphlpapi.h....
The following is my test code eg:
#include <QtCore/QCoreApplication>
#include <windows.h>
#include <iphlpapi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <netcon.h>
PIP_ADAPTER_INFO pAdapterInfo;
ULONG bufferLen;
int main(int argc, char *argv[])
{
if( GetAdaptersInfo(pAdapterInfo, &bufferLen) != ERROR_SUCCESS )
{
}
return a.exec();
}
#include <QtCore/QCoreApplication>
#include <windows.h>
#include <iphlpapi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <netcon.h>
PIP_ADAPTER_INFO pAdapterInfo;
ULONG bufferLen;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
if( GetAdaptersInfo(pAdapterInfo, &bufferLen) != ERROR_SUCCESS )
{
}
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Need some help with this...
Secondly,How do I include netcon.h and its required files for use in my application?I tried #include <netcon.h> but it says no such file or directory...
Thanks in advanced.
Bookmarks