I am following tutorials on gSOAP website to build a gSOAP-based web service. Specifically, I follow an example for building this service using calc.c from the auto-generated calc.h. I have run the following commands in Ubuntu.
wsdl2h -c -o calc.h http://www.genivia.com/calc.wsdl
soapcpp2 -CL calc.h
cc -o calc calc.c soapClient.c soapC.c stdsoap2.c
The second command, soapcpp2 -CL calc.h, is supposed to generate files required for the compilation of a gSOAP-based application.
The problem is that the file stdsoap2.c is not generated and I could not figure out the problem.
I tried to re-install the gsoap package and run the commands again, but it did not generate the stdsoap2.c file.
I read an answer here, but I could not locate the gsoap directory in ubuntu. So, I copied the stdsoap2.c and stdsoap2.h files from another project and pasted them into mine, which happened to pass this error. Then I had another error that calc.c was not generated, and something about the gsoap version.
cc1: fatal error: calc.c: No such file or directory
compilation terminated.
In file included from soapH.h:16,
from soapClient.c:18:
soapStub.h:20:3: error: #error "GSOAP VERSION 208117 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE"
20 | # error "GSOAP VERSION 208117 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE"
| ^~~~~
In file included from soapH.h:16,
from soapC.c:19:
soapStub.h:20:3: error: #error "GSOAP VERSION 208117 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE"
20 | # error "GSOAP VERSION 208117 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE"
| ^~~~~
How to do this right?