title: compiling gsoap sample hello service
body: <p>i downloaded gsoap 2.8.14, configure and install with the following commands:</p>
  
  <pre><code>./configure --disable-ssl --enable-samples --enable-debug
  make
  make install
  </code></pre>
  
  <p>im tried to compile gsoap sample "hello". so i took the the wsdl file from the sample and did the following:</p>
  
  <pre><code>wsdl2h -s -o hello.h h.wsdl
  soapcpp2 hello.h
  </code></pre>
  
  <p>i copied the generated files into a new eclipse c++ project and excluded soapClientLib.cpp and soapServerLib.cpp because i was receiving errors like </p>
  
  <blockquote>
    <p>multiple definition of .....</p>
  </blockquote>
  
  <p>i then created a helloserver.cpp and here is the content:</p>
  
  <pre><code>#include "soapH.h"
  #include "Service.nsmap"
  
  int main() 
  {
    return soap_serve(soap_new);
  }
  
  int __ns1__hello(struct soap *soap, char* helloReq, char* &amp;helloResponse)
  {
    return SOAP_OK;
  }
  </code></pre>
  
  <p>when i build in eclipse, i receives an error:</p>
  
  <pre><code>...soapServer.cpp:77 undefined reference to __ns1__hello(soap*,_ns2_hello*, _ns__helloResponse*)
  </code></pre>
  
  <p>when i trace to soapServer.cpp, this line is getting the error:</p>
  
  <pre><code>soap-&gt;error=__ns1_hello(soap,soap_tmp___ns1_hello.ns2__hello,&amp;ns2__helloResponse);
  </code></pre>
  
  <p>why am i getting this error? im using the sample hello wsdl from gsoap</p>