Micchaleq
Micchaleq

Reputation: 433

gSoap missing stdsoap2.cpp, undefined reference to `soap_peek_element'

I have a problem with gSoap. I generated files by running these commands:

wsdl2h -o calc.h http://www.genivia.com/calc.wsdl
soapcpp2 -i -j -I/usr/share/gsoap/import calc.h

After that, I included the files to my project

pro file:

TARGET = calc
TEMPLATE = app   
SOURCES += main.cpp\
        mainwindow.cpp\
        test/soapC.cpp\
        test/soapcalcProxy.cpp\
HEADERS  += mainwindow.h \
        test/soapcalcProxy.h \
        test/soapH.h \
        test/soapStub.h \    
FORMS    += mainwindow.ui

main.cpp

#include "mainwindow.h"
#include <QApplication>
#include "test/soapcalcProxy.h"
#include "test/calc.nsmap"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    calcProxy service;

    MainWindow w;
    w.show();

    return a.exec();
}

Now I have a lot of errors, which include

soapC.cpp:187: error: undefined reference to `soap_lookup_type'

I was looking for some answers and I found only information about stdsoap2.cpp (that I have to include it in my project ). I have gSoap 2.8 and I don't have this file. I only have stdsoap2.h.

What I should to do?

Upvotes: 2

Views: 6032

Answers (2)

Ajayan Alphonse
Ajayan Alphonse

Reputation: 1

ok

Just remove that files (stdsoap2.h and stdsoap2.cpp) during the compilation and include -lgsoap++ during the link process

happy coding

Upvotes: 0

mpromonet
mpromonet

Reputation: 11942

You should link with the gSOAP library, this could be achieve adding in the .pro file:

LIBS=-lgsoap++

Upvotes: 5

Related Questions