I become very exasperated!!! AAAAAHHHHHHH!!!!! I compile the files as:
gcc.exe -c calc_client.c -o calc_client.o -I"C:/Dev-Cpp/include" -I"C:/gsoap-2.7/gsoap" <<<<<< ok!!! gcc.exe -c soapC.c -o soapC.o -I"C:/Dev-Cpp/include" -I"C:/gsoap-2.7/gsoap" <<<<<<< ok!! gcc.exe -c soapClient.c -o soapClient.o -I"C:/Dev-Cpp/include" -I"C:/gsoap-2.7/gsoap" <<<<<< ok!! When I link them, gcc.exe calc_client.o soapC.o soapClient.o -o "gSOAP.exe" -L"C:/Dev-Cpp/lib" -lwsock32 Linker dumps me: calc_client.o(.text+0x53):calc_client.c: undefined reference to `soap_init' calc_client.o(.text+0x14f):calc_client.c: undefined reference to `soap_print_fault' soapC.o(.text+0x12a):soapC.c: undefined reference to `soap_malloc' soapC.o(.text+0x177):soapC.c: undefined reference to `soap_malloc' soapC.o(.text+0x1db):soapC.c: undefined reference to `soap_malloc' soapC.o(.text+0x22e):soapC.c: undefined reference to `soap_malloc' soapC.o(.text+0x39a):soapC.c: undefined reference to `soap_malloc' soapC.o(.text+0x46b):soapC.c: more undefined references to `soap_malloc' follow soapC.o(.text+0x57d):soapC.c: undefined reference to `soap_peek_element' soapC.o(.text+0x5b1):soapC.c: undefined reference to `soap_lookup_type' soapC.o(.text+0x5d4):soapC.c: undefined reference to `soap_lookup_type' soapC.o(.text+0x91f):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0x971):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0x9c3):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0xa15):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0xa67):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0xab9):soapC.c: more undefined references to `soap_match_tag' follow soapC.o(.text+0xe40):soapC.c: undefined reference to `soap_peek_element' soapC.o(.text+0xeb7):soapC.c: undefined reference to `soap_match_tag' soapC.o(.text+0xf9d):soapC.c: undefined reference to `soap_element_end_in' soapC.o(.text+0x152b):soapC.c: undefined reference to `soap_embed' soapC.o(.text+0x15ab):soapC.c: undefined reference to `soap_outbyte' soapC.o(.text+0x162d):soapC.c: undefined reference to `soap_inbyte' soapC.o(.text+0x167a):soapC.c: undefined reference to `soap_embed' soapC.o(.text+0x16fa):soapC.c: undefined reference to `soap_outint' soapC.o(.text+0x177c):soapC.c: undefined reference to `soap_inint' soapC.o(.text+0x17c7):soapC.c: undefined reference to `soap_embed' Can you help me, please? I'm working on Windows XP platform and MinGw 3.4.2 --- In [email protected], "jeusdi" <jeu...@...> wrote: > > 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. >
