使用多个 gSOAP 实现时的重新定义错误
我一直试图在同一个 C++ 项目上组合 gSOAP 客户端和 gSOAP 服务器(我使用 gSOAP 版本 2.7.17)。
当我尝试构建项目时,编译器出现多个重新定义错误。它说“soap_write_byte”,“saop_read_string”,“soap_write_string”和其他类似的低级函数在源代码中重新定义,尽管我遵循了有关组合多个gSOAP实现的gSOAP教程(即创建通用源文件envH.h和envC) .cpp,编译stdsoap2.cpp并设置标志-DWITH_NONAMESPACES)
这两个重新定义发生在envH.h和客户H.h.
,你能帮我吗?
I'm stuck trying to combine a gSOAP client and a gSOAP server on the same C++ project (I use gSOAP version 2.7.17).
When I try to build the project I get multiple redefinition errors from the compiler. It says that "soap_write_byte", "saop_read_string, "soap_write_string" and other similar low-level functions are redefined in the source code although I have followed the gSOAP tutorial about combining multiple gSOAP implementations (i.e. creating the commom source files envH.h and envC.cpp, compiling stdsoap2.cpp and setting the flag -DWITH_NONAMESPACES)
the two redefinition occurs in envH.h and clientH.h.
please, can you help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
同样的问题,这是 gsoap 2.7 中的问题,2.8 版添加了一些 #ifdef 防护来删除警告。您也可以自己完成,但每次重建都会丢失所有更改!
Same issue here, it's a problem in gsoap 2.7, version 2.8 adds a few #ifdef guards that remove the warnings. You could do it by yourself too, but each time you rebuild you would lose all the changes!