简体   繁体   English

gSoap:通过soapcpp2同时使用几个头文件

[英]gSoap: simultaneous usage of several header files with soapcpp2

I am currently using gSoap's soapcpp2 for generating XML serializer/deserializers for my own data types. 我目前正在使用gSoap的soapcpp2为自己的数据类型生成XML序列化器/反序列化器。

I simply define my type in a header file and then I submit it to soapcpp2 using the following command line: 我只是在头文件中定义我的类型,然后使用以下命令行将其提交给soapcpp2

soapcpp2 -e -j myheader.h

ATTENTION : the header file does not come from wsdl2h (another tool provided by gSoap) but instead it is handwritten. 注意 :头文件不是来自wsdl2h (gSoap提供的另一个工具),而是手写的。

This produces (among the others) the files soapH.h and soapC.c which actually are the header and the implementation of such serializer/deserializers. 这将产生(除其他外)文件soapH.hsoapC.c ,它们实际上是此类串行器/解串器的标头和实现。

Now let's suppose I want to do that on two distinct header files (call them myheader1.h and myheader2.h ): both of them will produce their own soapH.h and soapC.c but I need to link both versions of them in my executable code... How can I do that? 现在,让我们假设我想在两个不同的头文件(将它们命名为myheader1.hmyheader2.h )上执行此操作:它们都将生成自己的soapH.hsoapC.c但我需要在我的两个链接中都链接它们的两个版本可执行代码...我该怎么做?

Isn't there an option to let soapcpp2 to customize the name of soapH.h and soapC.c ? 是否没有让soapcpp2自定义soapH.hsoapC.c名称的soapH.h

Am I completely wrong and there is a better approach to this issue? 我是否完全错误,并且有解决此问题的更好方法?

最后,我开始使用soapcpp2标准输入...因此,例如,如果我同时有两个头文件要由soapcpp2处理,那么我将发出以下命令(在Linux上):

cat header1.h header2.h > soapcpp2 -e -j

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM