error C2065: “GAA_FLAG_SKIP_ANYCAST”: 未声明的标识符

简介: 在编译文章: 使用GetAdaptersAddresses函数获取物理MAC地址中的代码时,出现以下错误: 错误 2 error C2065: “GAA_FLAG_SKIP_ANYCAST”: 未声明的标识符 f:\ccprojects\获取网卡物理地址mac地址\获取网卡物理地址mac地址\temporary.

在编译文章:
使用GetAdaptersAddresses函数获取物理MAC地址中的代码时,出现以下错误:
错误 2 error C2065: “GAA_FLAG_SKIP_ANYCAST”: 未声明的标识符 f:\ccprojects\获取网卡物理地址mac地址\获取网卡物理地址mac地址\temporary.cpp 11 1 获取网卡物理地址MAC地址

环境:Windows7+VS2010

解决办法:
添加头文件:

#include<WinSock2.h>  
#include<WS2tcpip.h>
目录
相关文章
error C2065: “IAcadPreferences”: 未声明的标识符
error C2065: “IAcadPreferences”: 未声明的标识符
variable `xxx' has initializer but incomplete type的解决方法
variable `xxx' has initializer but incomplete type的解决方法
299 0
|
4月前
|
API Android开发 开发者
debug常见错误,出现debug时出现跑进为条件为false的if语句,DELETE_FAILED_INTERNAL_ERROR Error while In
debug常见错误,出现debug时出现跑进为条件为false的if语句,DELETE_FAILED_INTERNAL_ERROR Error while In
35 5
|
9月前
|
安全 C语言
警告 1 warning C4996: ‘scanf‘: This function or variable may be unsafe.
警告 1 warning C4996: ‘scanf‘: This function or variable may be unsafe.
pywintypes.com_error: (-2147221005, ‘无效的类字符串‘, None, None)
pywintypes.com_error: (-2147221005, ‘无效的类字符串‘, None, None)
1365 0
pywintypes.com_error: (-2147221005, ‘无效的类字符串‘, None, None)
|
SQL 并行计算 数据库连接
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
成功解决pywintypes.com_error: (-2147221005, '无效的类字符串', None, None)
成功解决pywintypes.com_error: (-2147221005, '无效的类字符串', None, None)
成功解决pywintypes.com_error: (-2147221005, '无效的类字符串', None, None)
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
412 0
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
解决办法:对lzma_stream_decoder/lzma_code/lzma_end未定义的引用
解决办法:对lzma_stream_decoder/lzma_code/lzma_end未定义的引用
203 0
解决办法:找不到g_type_check_instance_cast
解决办法:找不到g_type_check_instance_cast
138 0