I’m trying to use gSoap in QT. When I compile my project I get:
undefined reference to `soap_new'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
My sample pro contains:
INCLUDEPATH += ../../gsoap-2.8/gsoap/
LIBS += -lwsock32
Any idea what’s wrong?
I produced file with:
soapcpp2 -I ../../gsoap-2.8/gsoap/import -i quote.h
soapcpp2 -I ../../gsoap-2.8/gsoap/import quote.h
Those functions are defined in
sdtsoap2.corstdsoap2.cpp(depending if you are using C or C++; for Qt I infer C++).You must either include
stdsoap2.cppin your project or link againstlibsoap++.If you need to pass different flags like
WITH_NONAMESPACES, use the first.If you have no special configuration for GSOAP, use the later.Look at GSOAP docs for more info.