Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

gSOAP and generated code compilation errors in cascades

Wondering if any one has any experience working with gSOAP and trying to use the code that was generated by it from a wsdl file in a cascades project?

 

I followed the knowledge base article and that worked well to get all the libraries built and the library linked into my project. Then I used the soap2cpp tool to generate code from my wsdl file, copied that code into my project and tried to build against that library. All I seem to end up are a bunch of errors like these:

 

/Users/me/ndk-10.0.6-workspace/gsoaplib/lib/libgsoap++.a(libgsoap___a-stdsoap2_cpp.o): In function `frecv':

/Users/me/ndk-10.0.6-workspace/gsoap-2.8/gsoap/stdsoap2_cpp.cpp:885: undefined reference to `std::istream::read(char*, int)'

/Users/me/ndk-10.0.6-workspace/gsoaplib/lib/libgsoap++.a(libgsoap___a-stdsoap2_cpp.o): In function `fsend':

/Users/me/ndk-10.0.6-workspace/gsoap-2.8/gsoap/stdsoap2_cpp.cpp:539: undefined reference to `std::smileysurprised:stream::write(char const*, int)'

/Applications/bbndk/target_10_0_9_1425/qnx6/usr/include/c++/4.6.3/ostream:515: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'

Users//ndk-10.0.6-workspace/gsoaplib/lib/libgsoap++.a(libgsoap___a-stdsoap2_cpp.o): In function `__check_facet<std::ctype<char> >':

/Applications/bbndk/target_10_0_9_1425/qnx6/usr/include/c++/4.6.3/bits/basic_ios.h:51: undefined reference to `std::__throw_bad_cast()'

/Users//ndk-10.0.6-workspace/gsoaplib/lib/libgsoap++.a(libgsoap___a-stdsoap2_cpp.o): In function `operator<< <std::char_traits<char> >':

/Applications/bbndk/target_10_0_9_1425/qnx6/usr/include/c++/4.6.3/ostream:515: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'

 

All the errors seem to be inside the library and related to the std library/namespace somehow. Is there a step that I missed? Do I somehow need to link the standard library to cascades?

Like all of my posts
Please use plain text.
Contributor
ishar
Posts: 10
Registered: ‎06-23-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: none

Re: gSOAP and generated code compilation errors in cascades

I have just added the generated files to my project, linked to all necessary libs and it works flawlessly.

 

My .pro file is like:

INCLUDEPATH += ../src ${QNX_TARGET}/usr/include/openssl
DEPENDPATH += ../src ${QNX_TARGET}/usr/include/openssl 
LIBS += -lsocket -lz -lssl -lcrypto 

 

Following files from gsoap are used (gsoap code generated in c++ and with proxy):

soapC.cpp

soapH.h

soapStub.h

*ServiceProxy.cpp

*ServiceProxy.h

stdsoap2.cpp

stdsoap2.h

*.nsmap

 

Please use plain text.
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: gSOAP and generated code compilation errors in cascades

Ok thanks, glad someone got it working. I moved on to KDSoap and its compiling so I'll keep going with that unless there are problems and comeback to try and get this to work.
Like all of my posts
Please use plain text.