NetworkSys Co. Ltd
NetworkSys Co. Ltd

Reputation: 156

GSoap QT undefined reference to `soap_new'?

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

Upvotes: 1

Views: 4205

Answers (1)

j4x
j4x

Reputation: 3716

Those functions are defined in sdtsoap2.c or stdsoap2.cpp (depending if you are using C or C++; for Qt I infer C++).

You must either include stdsoap2.cpp in your project or link against libsoap++.

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.

Upvotes: 1

Related Questions