Board index » cppbuilder » gSOAP with BCB

gSOAP with BCB


2007-09-23 04:19:22 AM
cppbuilder47
Hi,
Is anyone using gSOAP successfully with BCB?
I have gSOAP 2.7.9k, and the soapcpp2.exe compiler generates source code
that BCB doesn't like (multiple declaration errors occur because the
generated code ends up with a struct and a function having the same name).
This is not a new issue (2.7.8c results in files with the same problem)
I've been told that other compilers (IBM XLC/C++ for one, I've been told)
don't have a problem with the generated code. *Sigh* The workaround I've
been told about is to manually rename the struct (everywhere) so that it
does not conflict with the associated function name. This is do-able, but
it's a pain in the you-know-what. Is there an easier/better way to get
around this annoyance?
One option would be to modify and re-compile the source for soapcpp2.exe so
that it uses different names for the struct and the function, but the
sources for soapcpp2.exe won't compile with BCB either! *Double Sigh*
Interestingly, a Google search for cppbuilder and gsoap turns up almost
nothing, though there is one 3-year old message asking the same question I
am asking, with no replies. *Triple Sigh*
Any help would be greatly appreciated.
- Dennis
 
 

Re:gSOAP with BCB

What it generates is invalid. The compiler has no option to accept it.
If you cannot recompile the sources to that tool then either continue to
manually alter the generated code or write a C or C++ program to do the
postprocessing for you.
. Ed
Quote
Dennis Jones wrote in message
news:46f578c8$ XXXX@XXXXX.COM ...
Hi,

Is anyone using gSOAP successfully with BCB?

I have gSOAP 2.7.9k, and the soapcpp2.exe compiler generates source code
that BCB doesn't like (multiple declaration errors occur because the
generated code ends up with a struct and a function having the same name).
This is not a new issue (2.7.8c results in files with the same problem)
I've been told that other compilers (IBM XLC/C++ for one, I've been told)
don't have a problem with the generated code. *Sigh* The workaround I've
been told about is to manually rename the struct (everywhere) so that it
does not conflict with the associated function name. This is do-able, but
it's a pain in the you-know-what. Is there an easier/better way to get
around this annoyance?

One option would be to modify and re-compile the source for soapcpp2.exe
so that it uses different names for the struct and the function, but the
sources for soapcpp2.exe won't compile with BCB either! *Double Sigh*

Interestingly, a Google search for cppbuilder and gsoap turns up almost
nothing, though there is one 3-year old message asking the same question I
am asking, with no replies. *Triple Sigh*

Any help would be greatly appreciated.
 

Re:gSOAP with BCB

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
What it generates is invalid. The compiler has no option to accept it.
Hi Ed,
I hope I am mistaken, but you sound biased. Do you use SOAP in your
applications or are you otherwise familiar enough with the output generated
by the soapcpp2 compiler to make that statement as fact?
Couldn't it also be that the Borland compiler is wrong? Other compilers
don't seem to have a problem with the code generated by soapcpp2, and more
often than not, when this sort of thing happens (Borland fails where other
compilers succeed), it is Borland's compiler that is at fault, not everybody
else's. So, I'm going to be cautious about accepting your statement out of
hand, but I would like more information.
Also, it seems reasonable to assume that the authors of SOAP (some pretty
smart people) were capable of creating something that would work with any
reasonably compliant compiler. I'm not saying that the soapcpp2.exe
compiler is necessarily correct (because I don't know) -- but in my
experience, Borland's compiler has had issues that needed to be worked
around, so that seems like the most likely scenario.
Unfortunately, it appears that the code generation is coming from a .y
(yacc) file, and since I don't read/write yacc, I have no idea how to edit
the .y file to correct the problem (if there is indeed a problem).
If you have more information or proof that soapcpp2 is generating bad code,
I'd like to know more about it. Or if you know how to fix the .y file to
correct the problem, I'd love to know how!
Thanks,
- Dennis
 

{smallsort}

Re:gSOAP with BCB

Quote
I hope I am mistaken, but you sound biased. Do you use SOAP in your
applications or are you otherwise familiar enough with the output
generated by the soapcpp2 compiler to make that statement as fact?
You spoke of the specifics of the invalid output in your message. My "bias"
in making "that statement as fact" was in accepting what you said in your
message as fact.
Quote
Other compilers don't seem to have a problem with the code generated by
soapcpp2
Then either use the compiler that accepts the code or do something about the
code.
Quote
If you have more information or proof that soapcpp2 is generating bad
code, ...
I don't need to give such proof. Your original message stated that it was
generating bad code or more correctly bad naming.
. Ed
Quote
Dennis Jones wrote in message
news:46f5c58c$ XXXX@XXXXX.COM ...

>What it generates is invalid. The compiler has no option to accept it.

I hope I am mistaken, but you sound biased. Do you use SOAP in your
applications or are you otherwise familiar enough with the output
generated by the soapcpp2 compiler to make that statement as fact?

Couldn't it also be that the Borland compiler is wrong? Other compilers
don't seem to have a problem with the code generated by soapcpp2, and more
often than not, when this sort of thing happens (Borland fails where other
compilers succeed), it is Borland's compiler that is at fault, not
everybody else's. So, I'm going to be cautious about accepting your
statement out of hand, but I would like more information.

Also, it seems reasonable to assume that the authors of SOAP (some pretty
smart people) were capable of creating something that would work with any
reasonably compliant compiler. I'm not saying that the soapcpp2.exe
compiler is necessarily correct (because I don't know) -- but in my
experience, Borland's compiler has had issues that needed to be worked
around, so that seems like the most likely scenario.

Unfortunately, it appears that the code generation is coming from a .y
(yacc) file, and since I don't read/write yacc, I have no idea how to edit
the .y file to correct the problem (if there is indeed a problem).

If you have more information or proof that soapcpp2 is generating bad
code, I'd like to know more about it. Or if you know how to fix the .y
file to correct the problem, I'd love to know how!
 

Re:gSOAP with BCB

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
I don't need to give such proof. Your original message stated that it was
generating bad code or more correctly bad naming.
Well, the problem was, I didn't know if the generated code was truly bad, or
if the Borland compiler was simply unable to handle something it should have
been able to, and I was asking if you could provide information that would
show gSOAP to be at fault (as opposed to Borland).
However, I did find a bug report on SourceForge.net referring to this very
issue. In response, the author provided a PHP script to eliminate the
conflict. I have tested the script, and it does indeed address the problem
with the Borland compiler. I still don't know if it is gSOAP's problem or
Borland's problem, but at this point I am happy to have a solution (and it's
automate-able, which is always a plus!).
- Dennis