按装之后到VC工程里进行设置路径: 具体方法: TOOLS-》OPTIONS-》DIRECTORIES: include files library files 两个选项下分别加入你的新的PLATFORM SDK 路径(注意要放在VC默认路径的前面!!!)
错误信息如下 --------------------Configuration: MCastSvr - Win32 Release-------------------- Compiling... MCastSvrDlg.cpp E:\SDK\MCastSvr\MCastSvrDlg.cpp(148) : error C2065: 'IPPROTO_IPV6' : undeclared identifier E:\SDK\MCastSvr\MCastSvrDlg.cpp(149) : error C2065: 'IPV6_MULTICAST_HOPS' : undeclared identifier E:\SDK\MCastSvr\MCastSvrDlg.cpp(211) : error C2065: 'IPV6_MULTICAST_LOOP' : undeclared identifier E:\SDK\MCastSvr\MCastSvrDlg.cpp(259) : error C2027: use of undefined type 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.cpp(259) : error C2227: left of '->ai_family' must point to class/struct/union E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2027: use of undefined type 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2227: left of '->ai_addr' must point to class/struct/union E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2227: left of '->sin_addr' must point to class/struct/union E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2228: left of '.S_un' must have class/struct/union type E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2228: left of '.S_addr' must have class/struct/union type E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2027: use of undefined type 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2227: left of '->ai_addr' must point to class/struct/union E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2227: left of '->sin_addr' must point to class/struct/union E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2228: left of '.S_un' must have class/struct/union type E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2228: left of '.S_addr' must have class/struct/union type E:\SDK\MCastSvr\MCastSvrDlg.cpp(267) : error C2027: use of undefined type 'addrinfo' E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo'
在TOOLS-》OPTIONS-》DIRECTORIES: include files中将新添加的SDK的目录拖动到最上面。
具体方法:
TOOLS-》OPTIONS-》DIRECTORIES:
include files
library files
两个选项下分别加入你的新的PLATFORM SDK 路径(注意要放在VC默认路径的前面!!!)
--------------------Configuration: MCastSvr - Win32 Release--------------------
Compiling...
MCastSvrDlg.cpp
E:\SDK\MCastSvr\MCastSvrDlg.cpp(148) : error C2065: 'IPPROTO_IPV6' : undeclared identifier
E:\SDK\MCastSvr\MCastSvrDlg.cpp(149) : error C2065: 'IPV6_MULTICAST_HOPS' : undeclared identifier
E:\SDK\MCastSvr\MCastSvrDlg.cpp(211) : error C2065: 'IPV6_MULTICAST_LOOP' : undeclared identifier
E:\SDK\MCastSvr\MCastSvrDlg.cpp(259) : error C2027: use of undefined type 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.cpp(259) : error C2227: left of '->ai_family' must point to class/struct/union
E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2027: use of undefined type 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2227: left of '->ai_addr' must point to class/struct/union
E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2227: left of '->sin_addr' must point to class/struct/union
E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2228: left of '.S_un' must have class/struct/union type
E:\SDK\MCastSvr\MCastSvrDlg.cpp(264) : error C2228: left of '.S_addr' must have class/struct/union type
E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2027: use of undefined type 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2227: left of '->ai_addr' must point to class/struct/union
E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2227: left of '->sin_addr' must point to class/struct/union
E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2228: left of '.S_un' must have class/struct/union type
E:\SDK\MCastSvr\MCastSvrDlg.cpp(265) : error C2228: left of '.S_addr' must have class/struct/union type
E:\SDK\MCastSvr\MCastSvrDlg.cpp(267) : error C2027: use of undefined type 'addrinfo'
E:\SDK\MCastSvr\MCastSvrDlg.h(63) : see declaration of 'addrinfo'
include files中将新添加的SDK的目录拖动到最上面。
工具--〉选择--〉目录 里面我看见已经有这两个目录了