\sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal
2011-08-02 14:04
429 查看
\sdk\include\wspiapi.h reference to a zero-sized array is illegal实践中的解决方法
2009-12-29 22:56
2009-12-29 22:56
今天,编译了下盘古1.5的源码发现个错误,原来是我VC6.0的问题,呵呵 于是,马上求助了下百度大叔,不敢独享,特来分享。 编写IP多播程序时,要用到ip_mrep结构,在编译时会遇到如下的错误: \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 这种错误是由于wspiapi.h头文件里缺少 #define _WSPIAPI_COUNTOF 语句造成的. 解决办法是:找到你安装的platformsdk/include目录下的wspiapi.h头文件,开头部分写如这条语句即可:#define _WSPIAPI_COUNTOF 如: 1>.源库文件代码: #ifndef _WSPIAPI_H_ #define _WSPIAPI_H_ #include <stdio.h> // sprintf() #include <stdlib.h> // calloc(), strtoul() #include <malloc.h> // calloc() #include <string.h> // strlen(), strcmp(), strstr() 修改后代码: #ifndef _WSPIAPI_H_ #define _WSPIAPI_H_ //小天添加 //#define _WSPIAPI_COUNTOF // #include <stdio.h> // sprintf() #include <stdlib.h> // calloc(), strtoul() #include <malloc.h> // calloc() #include <string.h> // strlen(), strcmp(), strstr() |
相关文章推荐
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解决方案
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- \sdk\include\wspiapi.h(47) : error C2265: '' : reference to a zero-sized array is illegal
- wspiapi.h(45) : error C2265: '' : reference to a zero-sized array is illegal.
- error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- \include\wspiapi.h(45) : error C2265: '<Unknown>' : reference to a zero-siz
- error C2265: '' : reference to a zero-sized array is illegal解决办法
- reference to a zero-sized array is illegal解决办法
- reference to a zero-sized array is illegal
- java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence
- Error: undefined reference to `templatename<int,int >' ( error LNK2019: 无法解析的外部符号......)
- c++ error: reference to 'plus' is ambiguous ; template<class _Tp> struct std::plus
- 求解xilinx ISE使用报错的处理——Port <clk> has illegal connections. This port is connected to an input buffer
- NSUnknownKeyException', reason: '[<UIApplication 0x8a58320> setValue:forUndefinedKey:]
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)