PDA

View Full Version : QMake and GSoap



srccode
13th April 2006, 23:13
Hi, im trying to compile my QT solution with GSoap.

I have a GSoap C++ app compiling ala:

g++ -I/root/gsoap-linux-2.7/ -I/root/gsoap-linux-2.7/import -o test.o test.cpp soapC.cpp soapClient.cpp /root/gsoap-linux-2.7/stdsoap2.cpp

I just downloaded the soap 2.7 tar file for linux, extracted it and started to use it.

I now want to simply add GSoap support to my QMake file (.pro file)

In my .pro file I have:

sources = gatekeeper.cpp... etc
sources += soap/soapC.cpp soap/soapClient.cpp

headers = gatekeeper.h .. etc

config += thread

includepath += /usr/include
includepath += /root/gsoap-linux-2.7/
includepath += /root/gsoap-linux-2.7/import

unix:libs += -L/usr/lib64

So yeah, I don't have any additional headers or libraries included... so the error im getting is:

miltiple definition of 'namespaces'

now the variable namespaces is declared extern in stdsoap2.h and as an array in my SoapService.nsmap file... but I'm not sure how to fix this in my QMake file... what's going?

srccode
14th April 2006, 00:19
nevermind... i was including the ServiceSoap.nsmap in a class header that was instanciated more than once... there was a variable called 'namespaces' inside of that... even though I added #ifndef #define.... #endif to that file it still somehow saw multiple copies of it... go figure!

i just moved the #include into my main.cpp file and now it works fine :| weird world