我是Visual C++新手。我在Windows XP中安装了Visual C++ 2008 Express Edition(带有SP1)。我正在尝试编译一个开源的Visual C++项目。如何将ws2tcpip.h和ws2def.h包含到Visual C++ 2008项目中?
我已经在VC++ 2008 Express中打开了.vcproj
项目。当我使用生成>重建解决方案,它显示下面的输出:
3 error(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
下面是3个错误:
error C3861: 'IN6_IS_ADDR_MULTICAST': identifier not found
error C2065: 'IPPROTO_IPV6' : undeclared identifier
error C2065: 'IPPROTO_IPV6' : undeclared identifier
我一直在google搜索了很长的时间。我发现,这些标识在以下文件:
ws2tcpip.h
ws2def.h
winsock2.h
如果我没有记错的话,这些文件被使用Windows开发人员可以做网络/套接字编程。它应该在Windows的某个地方可用。
我可以知道error C2065: undeclared identifier
和error C3861: identifier not found
之间的区别吗?
如何将ws2tcpip.h
和ws2def.h
包含到Visual C++ 2008项目中?
谢谢