GSoap integration into Qt
-
wrote on 29 Mar 2011, 11:01 last edited by
perhaps it's easy:
it says undefined reference, which means, you don't link against a lib that implements soap_new or you include a header that reference it but don use the cpp file.
Please check this.
-
wrote on 29 Mar 2011, 11:06 last edited by
Volker
Thank you :)
As you know, I am new and it completely slipped my mind that I should mention the platform as well (and I don't mind being told off for stuff like this). I have added a new line to my .pro file
@LIBS += C:\NokiaQtSDK\mingw\lib\libws2_32.a@
Still the error persists. I am going to look into the pkg-config thing. I have a feeling that the problem lies in there. Because I think the soap_* undefined problem stems from there.
-
wrote on 29 Mar 2011, 11:12 last edited by
And reading README and INSTALL text files of the libraries you use can also help:
[quote]README.txt:
To compile a client, all you need to do is to compile and link 'soapC.cpp', 'soapClient.cpp', and 'stdsoap2.cpp' (or the installed libgsoap++, see INSTALLATION below) with your code. [/quote]
[quote]INSTALL.txt:
You also need the following libraries (built from stdsoap2.c[pp]):
@
libgsoap++.a C++ runtime
libgsoapck++.a C++ runtime with HTTP cookie support
libgsoapssl++.a C++ runtime with cookies, zlib, and SSL
libgsoap.a C runtime
libgsoapck.a C runtime with HTTP cookie support
libgsoapssl.a C runtime with cookies, zlib, and SSL
@
Or you can use the stdsoap2.c and stdsoap2.cpp source directly, but you need to use the propoer -DWITH_X flags to enable support for 'X' (see above).
[/quote]EDIT:
To complete the things, you should add to your source list in the .pro:@
SOURCES += C:\gsoap-2.8\gsoap\stdsoap2.cpp
@And look for the WITH_XXX defines if you need SSL.
-
wrote on 29 Mar 2011, 11:13 last edited by
Please give us some more information:
- Platform (windows, which one)
- Compiler (mingw?)
- Qt version (4.7.2?)
The file you reference may be used by mingw, but not by MSVS. mingw and MSVS may not be mixed.
-
wrote on 29 Mar 2011, 11:29 last edited by
just interesting, had you a look at QtSoap? may it fit your needs?
-
wrote on 29 Mar 2011, 11:58 last edited by
To top off the comments: I doubt -QtSoap- gSoap will work properly without the network and XML modules of Qt. You might need to add those to your QT line in your .pro file.
-
wrote on 29 Mar 2011, 12:03 last edited by
Gerolf - I am using windows xp and mingw compiler but my original problem has now been resolved. Thank you for your help and time.
It is my understanding that QtSoap is a paid addition and that support for it is very negligible that is why I was sticking with gSoap.
Like Volker pointed out the problem was with the pkg_config addition in my original .pro file.
It was not working. Instead of that I added the stdsoap2.cpp to my sources. The project now compiles. Both methods work, you can either add it like volker did above or you can simply copy paste it into the app folder and then add it to your sources.
There is a lot of junk in my code due to all the hit and trial. I shall post the minimum requirements to run gSoap once I sort through all of this.
Please continue this discussion with other problems that you are facing or have faced in the past.
-
wrote on 29 Mar 2011, 12:16 last edited by
QtSoap is also released under GPL and part of "QtSolutions":http://qt.gitorious.org/qt-solutions
I'm currently using it on a project and it works fine for my needs.
Hope it is of any help. -
wrote on 29 Mar 2011, 12:25 last edited by
According to the "Qt Solutions Archive":http://qt.nokia.com/products/qt-addons/solutions-archive/ page at Nokia, the Qt SOAP solution has been "relicensed under the BSD license".
-
wrote on 29 Mar 2011, 12:32 last edited by
[quote author="awasay" date="1301400187"]Gerolf - I am using windows xp and mingw compiler but my original problem has now been resolved. Thank you for your help and time.
It is my understanding that QtSoap is a paid addition and that support for it is very negligible that is why I was sticking with gSoap.
Like Volker pointed out the problem was with the pkg_config addition in my original .pro file.
It was not working. Instead of that I added the stdsoap2.cpp to my sources. The project now compiles. Both methods work, you can either add it like volker did above or you can simply copy paste it into the app folder and then add it to your sources.
There is a lot of junk in my code due to all the hit and trial. I shall post the minimum requirements to run gSoap once I sort through all of this.
Please continue this discussion with other problems that you are facing or have faced in the past.[/quote]
I remember seeing this problem too and solved it by linking the library against binary I’m compiling properly. Maybe those scripts of mine helps about that.
Are you using CPP mode or C mode of it? You need link different library regarding which way you are using.
EDIT: And yeah, Google has been for me completely useless about gsoap, and their own documentation barely mentions CPP side of this... I basically read the files myself and that way forced it to work... C side works better but it’s very annoying to use.
And using QtSoap is viable alternative if it is enough good for one’s needs; for me it was not.
15/15