I have this client:

#include "soapH.h"
#include "calc.nsmap"

int main(int argc, char **argv)
{
     const char server[] =
"http://websrv.cs.fsu.edu/~engelen/calcserver.cgi";;

     struct soap soap;
     double a, b, result;

     soap_init(&soap);
     a = strtod(argv[2], NULL);
     b = strtod(argv[3], NULL);

     switch (*argv[1])
     {
         case 'a':
             soap_call_WScalc2__add(&soap, server, "", a, b, &result);
             break;
         case 's':
             soap_call_WScalc2__sub(&soap, server, "", a, b, &result);
             break;
     }

     if (soap.error)
         soap_print_fault(&soap, stderr);
     else
         printf("result = %g\n", result);

    return 0;
}

I perform this sentence in order to compile and link it:
gcc calc_client.c soapC.c soapClient.c stdsoap2.c -o calc.exe

This sentence dumps me too many errors and warnings:

...

soapClient.c:158: error: dereferencing pointer to incomplete type
soapClient.c:161: error: dereferencing pointer to incomplete type
soapClient.c:166: warning: passing arg 1 of `soap_put_WScalc2__mul' from
incompa
tible pointer type
soapClient.c:173: warning: passing arg 1 of `soap_default_double' from
incompati
ble pointer type
soapClient.c:179: error: `NULL' undeclared (first use in this function)
soapClient.c:179: warning: passing arg 1 of
`soap_get_WScalc2__mulResponse' from
  incompatible pointer type
soapClient.c:179: warning: assignment makes pointer from integer without
a cast
soapClient.c:180: error: dereferencing pointer to incomplete type
soapClient.c:181: error: dereferencing pointer to incomplete type
soapClient.c:181: error: `SOAP_TAG_MISMATCH' undeclared (first use in
this funct
ion)
soapClient.c:181: error: dereferencing pointer to incomplete type
soapClient.c:189: error: dereferencing pointer to incomplete type
soapClient.c:190: error: dereferencing pointer to incomplete type
soapClient.c: At top level:
soapClient.c:194: error: syntax error before "int"
soapClient.c:194: warning: "struct soap" declared inside parameter list
soapClient.c: In function `soap_call_WScalc2__div':
soapClient.c:195: error: storage size of 'soap_tmp_WScalc2__div' isn't
known
soapClient.c:201: error: dereferencing pointer to incomplete type
soapClient.c:206: warning: passing arg 1 of
`soap_serialize_WScalc2__div' from i
ncompatible pointer type
soapClient.c:208: error: dereferencing pointer to incomplete type
soapClient.c:209: error: dereferencing pointer to incomplete type
soapClient.c:209: error: `SOAP_IO_LENGTH' undeclared (first use in this
function
)
soapClient.c:213: warning: passing arg 1 of `soap_put_WScalc2__div' from
incompa
tible pointer type
soapClient.c:216: error: dereferencing pointer to incomplete type
soapClient.c:219: error: dereferencing pointer to incomplete type
soapClient.c:224: warning: passing arg 1 of `soap_put_WScalc2__div' from
incompa
tible pointer type
soapClient.c:231: warning: passing arg 1 of `soap_default_double' from
incompati
ble pointer type
soapClient.c:237: error: `NULL' undeclared (first use in this function)
soapClient.c:237: warning: passing arg 1 of
`soap_get_WScalc2__divResponse' from
  incompatible pointer type
soapClient.c:237: warning: assignment makes pointer from integer without
a cast
soapClient.c:238: error: dereferencing pointer to incomplete type
soapClient.c:239: error: dereferencing pointer to incomplete type
soapClient.c:239: error: `SOAP_TAG_MISMATCH' undeclared (first use in
this funct
ion)
soapClient.c:239: error: dereferencing pointer to incomplete type
soapClient.c:247: error: dereferencing pointer to incomplete type
soapClient.c:248: error: dereferencing pointer to incomplete type
soapClient.c: At top level:
soapClient.c:252: error: syntax error before "int"
soapClient.c:252: warning: "struct soap" declared inside parameter list
soapClient.c: In function `soap_call_WScalc2__pow':
soapClient.c:253: error: storage size of 'soap_tmp_WScalc2__pow' isn't
known
soapClient.c:259: error: dereferencing pointer to incomplete type
soapClient.c:264: warning: passing arg 1 of
`soap_serialize_WScalc2__pow' from i
ncompatible pointer type
soapClient.c:266: error: dereferencing pointer to incomplete type
soapClient.c:267: error: dereferencing pointer to incomplete type
soapClient.c:267: error: `SOAP_IO_LENGTH' undeclared (first use in this
function
)
soapClient.c:271: warning: passing arg 1 of `soap_put_WScalc2__pow' from
incompa
tible pointer type
soapClient.c:274: error: dereferencing pointer to incomplete type
soapClient.c:277: error: dereferencing pointer to incomplete type
soapClient.c:282: warning: passing arg 1 of `soap_put_WScalc2__pow' from
incompa
tible pointer type
soapClient.c:289: warning: passing arg 1 of `soap_default_double' from
incompati
ble pointer type
soapClient.c:295: error: `NULL' undeclared (first use in this function)
soapClient.c:295: warning: passing arg 1 of
`soap_get_WScalc2__powResponse' from
  incompatible pointer type
soapClient.c:295: warning: assignment makes pointer from integer without
a cast
soapClient.c:296: error: dereferencing pointer to incomplete type
soapClient.c:297: error: dereferencing pointer to incomplete type
soapClient.c:297: error: `SOAP_TAG_MISMATCH' undeclared (first use in
this funct
ion)
soapClient.c:297: error: dereferencing pointer to incomplete type
soapClient.c:305: error: dereferencing pointer to incomplete type
soapClient.c:306: error: dereferencing pointer to incomplete type

...

What Am I doing wrong?
I will appreciate hour help a lot.
Thanks for all.

Reply via email to