title: WS-Discovery & gSOAP set up in VS2013
body: <p>My overarching goal is to create a small ONVIF client for getting camera information in either C or C++.</p>
  
  <p>gSOAP seemed like a good candidate and first thing I wanted to achieve was to make a small console application which would list the addresses of a bunch of cameras I have on my network using WS-Discovery, something I've done before with a little .NET application.</p>
  
  <p>The problem is I'm stumbling at the first hurdle and I'm a touch confused as to what I'm supposed to be doing.  I started out by doing the following:</p>
  
  <pre><code>wsdl2h.exe -o WSDiscovery.h WS-Discovery.wsdl http://www.w3.org/2006/03/addressing/ws-addr.xsd
  
  soapcpp2.exe -i -C -Iimport WSDiscovery.h -d output
  </code></pre>
  
  <p>, 
  I then made a project from the resulting <code>soapC.cpp</code> <code>stdsoap2.cpp</code> <code>soapH.h</code> <code>soapStub.h</code>.  Adding in <code>threads.h</code> <code>wsaapi.h</code> <code>wsddapi.h</code> <code>threads.c</code> <code>wsaapi.c</code> <code>wsddapi.c</code> from gsoap</p>
  
  <p>This doesn't compile however giving: </p>
  
  <p><code>wsaapi.h(134): error C2061: syntax error : identifier 'wsa__FaultSubcodeValues'</code></p>
  
  <p>I think I'm going very wrong here and I'm confused about exactly what a 'plugin' is in the context of gSOAP (my experience with external libraries like this is extremely limited and I have no real formal training in CS).  Am I just supposed to be doing what I'm doing now with the wsdd files or are they supposed to be used as part of the soapcpp2.exe process?  Am I actually supposed to be using wsdl2h.exe if I just want WS-Discovery?</p>
  
  <p>I can't really make sense of the documentation and don't understand how I'm supposed to get this working.  Some help would be greatly appreciated so I can crack on with the actual hard part!</p>