The reason is that libgsoap (which you must link with your
application) requires certain functions generated by the soapcpp2
compiler to be in the global namespace. When you place your own stuff
inside a namespace, these generated functions will also end up in that
namespace, and the linker will fail because it cannot find these
functions required by libgsoap. 

Running the gsoap compiler on an empty interface definition will
generate the functions required by libgsoap in the global namespace,
so linking succeeds. 

You can use any prefix you like, as long as it doesn't conflict with
your other code.

Hope this helps,

Jeroen

--- In [email protected], "Tony Baldarelli" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>     In the documentation (
> http://www.genivia.com/Products/gsoap/documentation.html ), there is a
> section called "18.34  How to Create Client/Server Libraries".  We
have this
> step: "soapcpp2 -c -penv env.h".  I have 2 questions:
>   1.. I cannot find the reason for this step.  All the functions in that
> code are static, it seems.  Why do we have this step?
>   2.. Can I use any prefix, or does it have to be "env"?
> Tony
>


Reply via email to