\sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解
来源:互联网 发布:打新基金 知乎 编辑:程序博客网 时间:2024/06/08 01:49
\sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解决方案
今天,编译了Gh0st源码发现个错误,原来是我VC6有问题哟,呵呵
百度、csdn都去了,终于解决了!不敢独享,特来分享..
编写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_2 #define _WSPIAPI_H_3 4 #include <stdio.h> // sprintf()5 #include <stdlib.h> // calloc(), strtoul()6 #include <malloc.h> // calloc()7 #include <string.h> // strlen(), strcmp(), strstr()
经过修改后代码:
#ifndef _WSPIAPI_H_#define _WSPIAPI_H_// 添加了#define _WSPIAPI_COUNTOF#define _WSPIAPI_COUNTOF#include <stdio.h> // sprintf()#include <stdlib.h> // calloc(), strtoul()#include <malloc.h> // calloc()#include <string.h> // strlen(), strcmp(), strstr()
然后重新编译程序即可!
转载请注明出处! Hoiker's BLOG(雪枫香雪亭):http://hoiker.cnblogs.com/ 祝大家工作愉快!呵呵
0 0
- \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 解
- 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
- error C2265: '' : reference to a zero-sized array is illegal解决办法
- reference to a zero-sized array is illegal解决办法
- Zero-sized Array
- error C2597: illegal reference to data member xxxx in a static member function
- android/frameworks/native/include/utils/Mutex.h:65: error: undefined reference to 'android::Mutex::l
- xilinx SDK #include "xgpio.h" error
- error: reference to 'max' is ambiguous
- error: reference to 'left' is ambiguous
- Solaris 10 如何解决:/usr/include/sys/siginfo.h:259: error: 'ctid_t' is used as a type, but is not
- Visual C++ Tips: error C2823: a typedef template is illegal
- 文件系统总体存储布局
- 去除马赛克神器/Infognition Video Enhancer_v1.9.9
- 宏汇编工具(MASM6.15)的使用
- Cstyle的札记,版本控制 SVN,第0篇
- 很值得看看的中文翻译The Django Book
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal 解
- 移居qjpcpu.github.io
- 【WebView】warnning:所有WebView方法必须在主线程调用(4.0) 所有WebView方法必须在同一线程调用(4.4)
- SharePoint2010 自定义代码登录方法
- 常见多线程并发服务器编程模型
- (已经得到cmm的同意)CVPR2014 Objectness Estimation at 300fps.(附上程序)
- 复制构造函数(拷贝函数)
- BlockingQueue
- Java内存查看与分析