Gianluca Ghettini
Gianluca Ghettini

Reputation: 11618

Redefinition errors when using multiple gSOAP implementations

I'm stuck trying to combine a gSOAP client and a gSOAP server on the same C++ project (I use gSOAP version 2.7.17).

When I try to build the project I get multiple redefinition errors from the compiler. It says that "soap_write_byte", "saop_read_string, "soap_write_string" and other similar low-level functions are redefined in the source code although I have followed the gSOAP tutorial about combining multiple gSOAP implementations (i.e. creating the commom source files envH.h and envC.cpp, compiling stdsoap2.cpp and setting the flag -DWITH_NONAMESPACES)

the two redefinition occurs in envH.h and clientH.h.

please, can you help me?

Upvotes: 0

Views: 682

Answers (1)

cpl
cpl

Reputation: 689

Same issue here, it's a problem in gsoap 2.7, version 2.8 adds a few #ifdef guards that remove the warnings. You could do it by yourself too, but each time you rebuild you would lose all the changes!

Upvotes: 2

Related Questions