\sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal
来源:互联网 发布:php三级分销代码 编辑:程序博客网 时间:2024/05/18 01:26
今天,编译了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
源代码如:
-->原库文件代码:
#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#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://blog.csdn.net/XenoStudio 祝大家工作愉快!呵呵
- \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
- HDU——Anniversary party 树DP入门
- 运放稳定性连载8:单电源缓冲器电路的实际设计(1)
- 曾国藩家书:做人须清廉谨慎勤劳
- ORACLE EXECUTE IMMEDIATE
- UIImageView Animations
- \sdk\include\wspiapi.h(47) : error C2265: '<Unknown>' : reference to a zero-sized array is illegal
- Howto: Compile and package Linux kernel 3.4.7
- iBatis使用小例
- poj 2096 马克科夫链
- apache FTp
- 使用NSTimer实现倒计时
- 网络编程之TCP服务器
- HDU 4161 Iterated Difference (模拟+递推)
- [SGU]100. A+B