soap_init(soap1); -> soap_init() function takes an object of struct soap and not a pointer to struct soap. Do: soap struct soap1; soap_init(&soap1); Or: soap struct* soap1 = soap_new(); soap_init(soap1);
Best Regards, Syed. R&D - Switch Commander and NetManager, COO OBS OSS R&D SPA11, Phone: +91 80 4363 3074, NSN internal VoIP number: 858 3074 Mobile: +91 98867 57409 ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of ext boulli86 Sent: Thursday, August 20, 2009 2:45 PM To: [email protected] Subject: [gsoap] Undefined Reference to 'soap_init' Dear all, I am using wsdl2h and soapcpp2 on gsoap ubuntu to generate a c file from a wsdl file that i built on java on windows. Everything is going ok BUT inside my generated c file where I initialize the soap with soap_init or soap_new() I get the following errors: "undefined reference to 'soap_init'" and "undefined reference to 'soap_new()' and "undefined reference to 'soap_serve'. I am including the following in my header: #include <stdio.h> #include <stdlib.h> #include "soapH.h" #include "soapStub.h" #include "stdsoap2.h" #include "test_USCOREWSDLBinding.nsmap" this is how I am calling the functions: struct soap *soap1; soap_init(soap1); soap_serve(soap_new()); In the properties I am including the gsoap directory where all the headers are located. Is there anything else I should include? Or should anything be linked so that my code is error free. Thank you so much in advance Charbel
