编写gSoap XML/RPC程序时出现“soapStub.h: error: redefinition of parameter ‘soap’”
来源:互联网 发布:考研英语网络课 编辑:程序博客网 时间:2024/06/14 19:19
最近使用gSOAP XML/RPC + C代码编写我的测试程序,编译时出现“soapStub.h: error: redefinition of parameter ‘soap’”。
[root@localhost src]# make iclient
gcc -o iclient iclient.c wsi2c.h soapClient.c soapC.c base.c base.h -lgsoap
In file included from soapH.h:13:0,
from iclient.c:12:
soapStub.h:255:132: error: redefinition of parameter ‘soap’
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__myset(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct soap *soap, char *bus, char *devaddr, int reg, int data, int *result);
根据提示,soap_call_ns__myset(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct soap *soap, char *bus, char *devaddr, int reg, int data, int *result),注意到了soap_call_ns__myset函数的参数出现了两个struct soap*soap,因此报此错。
解决方法是将iws.h文件直接删除struct soap *soap即可。
int ns__myset(struct soap *soap,char *bus, char *devaddr, int reg, int data, int *result);
如果服务器端需要使用struct soap *soap结构体指针,那就在服务器端程序中添加即可。例如:
1、iws.h
int ns__myset(char *bus, char *devaddr, int reg, int data, int *result);
2、iserver.c
int ns__myset(struct soap *soap,char *bus, char *devaddr, int reg, int data, int *result);
- 编写gSoap XML/RPC程序时出现“soapStub.h: error: redefinition of parameter ‘soap’”
- error C2572: 'xxxx' : redefinition of default parameter : parameter 5 解决办法
- redefinition of default parameter
- gsoap生成客户端程序,调用接口时出现 Error 200 fault: SOAP-ENV:Client [no subcode] 修改方法
- redefinition of default parameter : parameter 5
- redefinition of default parameter : parameter 1
- error: redefinition of
- JSON-RPC,XML-RPC,SOAP
- C++ ERROR redefinition of ‘class ***’
- error: redefinition of 'struct iphdr'
- C++ ERROR redefinition of ‘class ***’
- C++ ERROR redefinition of ‘class ***’
- error redefinition of 'xxx' 问题解决
- XML-RPC & SOAP
- SOAP vs XML-RPC
- SOAP协议 XML-RPC
- XML-RPC、SOAP对比
- error: redefinition of ‘struct ifmap’ 和 redefinition of ‘struct ifreq’(linux/if.h和net/if.h重复定义的解决)
- LeetCode447. Number of Boomerangs
- 解决iframe跳转不刷新整个页面小问题
- MATLAB随机函数
- Modern PHP笔记
- 大整数排序
- 编写gSoap XML/RPC程序时出现“soapStub.h: error: redefinition of parameter ‘soap’”
- Connection to localhost:5432 refused. Check that the hostname and port are correct and that the post
- Linux下使用popen()执行shell命令
- 《HTTP权威指南》读书笔记(一):初探缓存
- 二叉树的后序遍历
- 动手写window程序
- @Retention注解
- 一个测试任务并发执行时间的方法
- Java8中的forEach方法详解